|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
请问一下老师,用下面这个代码,出来的图片非常模糊,备注里面的图片是清晰的原图,请问可以修改一下代码,使单元格内的图片和备注里的图片一样吗?
救急了,跪谢跪谢!
Private Sub CommandButton3_Click()
On Error Resume Next
Dim rngTemp As Range, k As Range, shpPic As Picture
filepath = ThisWorkbook.path & "\"
Set rngTemp = Application.InputBox("图片插入区域:", "选择单元格", Type:=8)
For Each k In rngTemp
With k
Filename = Dir(filepath & .Value & "*.jpg")
If k <> "" And Filename <> "" Then
ActiveSheet.Shapes.AddPicture filepath & Filename, False, True, .Left, .Top, .Width, .Height
.ClearComments
.AddComment
.Comment.Shape.Fill.UserPicture filepath & "\" & .Value & ".jpg"
.Comment.Shape.Height = 240
.Comment.Shape.Width = 320
End If
End With
Next
End Sub
|
|