Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton1_Click()
- Application.ScreenUpdating = False
- Dim strPic As String
- On Error Resume Next
- Dim cRange As Integer
- strPic = "M:FTP ImagesQuotesheet Images GIF"
- cRange = (Range("I8").End(xlDown).Row) - 8
- Range("I8").Select
- For i = 0 To cRange
- With ActiveCell
- pic_file = strPic & .Value & ".gif"
- If Dir(pic_file) <> vbNullString Then
- Set pict1 = ActiveSheet.Pictures.Insert(pic_file)
- .AddComment
- .Comment.Shape.Fill.UserPicture strPic & .Value & ".gif"
- .Comment.Shape.Height = pict1.Height
- .Comment.Shape.Width = pict1.Width
- .Comment.Visible = False
- .Value = "Hover For Image"
- .Offset(1, 0).Select
- pict1.Delete
- Set pict1 = Nothing
- Else
- .Value = "Image Unavailable"
- .Offset(1, 0).Select
- End If
- End With
- Next
- Application.ScreenUpdating = True
- End Sub
Add Comment
Please, Sign In to add comment