2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > excel 将图片的链接URL 显示为图片 转

excel 将图片的链接URL 显示为图片 转

时间:2020-05-09 19:21:07

相关推荐

excel 将图片的链接URL 显示为图片 转

原帖:/forum/excel-questions/604604-insert-image-url-images-into-cells-2.html

1. 如下VBA脚本将c1单元格内图片url链接在单元B1内把图片显示出来

Sub Test()Dim Pic As PictureApplication.ScreenUpdating = FalseWith ActiveSheet.Range("C1")Set Pic = .Parent.Pictures.Insert(.Value)With .Offset(, -1)Pic.Top = .TopPic.Left = .LeftPic.Height = .HeightPic.Width = .WidthEnd WithEnd WithApplication.ScreenUpdating = TrueEnd Sub

2. 整列的图片url显示为图片

Sub Test()Dim Rng As RangeDim Cell As RangeDim Pic As PictureApplication.ScreenUpdating = FalseSet Rng = Range("C1:C" & Range("c" & Rows.Count).End(xlUp).Row)For Each Cell In RngWith CellSet Pic = .Parent.Pictures.Insert(.Value)With .Offset(, -1)Pic.Top = .TopPic.Left = .LeftPic.Height = .HeightPic.Width = .WidthEnd WithEnd WithNext CellApplication.ScreenUpdating = TrueEnd Sub

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。