Forum Discussion
rickcoulter1
Sep 07, 2021Copper Contributor
Embedded images in Excel that populate when you scroll over the appropriate cell
I'm working with a spreadsheet that has multiple images in expanded format. I was hoping to only have the images appear when I scroll over the appropriate cell. Currently, there are too many images on the spreadsheet that are in expanded format. Thanks for your help
2 Replies
- Juliano-PetrukioBronze Contributor
Considering cell D2 with the image path you can type on E2 the following UDF
=AddCommentWithImage(D2)
Public Function AddCommentWithImage(ByRef ImagePath As String) Dim rng As Range, cmt As Comment Set rng = ActiveCell If Not (rng.Comment Is Nothing) Then rng.Comment.Delete Set cmt = rng.AddComment cmt.Text Text:="" With cmt.Shape .Fill.UserPicture ImagePath .Width = 481.5864 .Height = 359.7734 End With End Function
- DKoontzIron ContributorYou could actually turn a comment into a picture, that way on hover, it'll display the picture you want to show.
You can turn a note into a picture by creating a new note > right clicking note > format comment > Colors and Lines > Fill > Color > Picture> upload picture from there.