Forum Discussion
DuyTan
Sep 22, 2021Copper Contributor
Please, I want to display image for column with content URL in excel.
I want to display image for column with content URL Hope the helping. thanks a lot.
5 Replies
- Juliano-PetrukioBronze Contributor
It required VBA for that. Also a frame to show the image.
One sugestion is using cell comments as frame. So when the user hover the mouse an image is shown.Considering cell B2 with the image path you can type on C2 the following UDF
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
- Juliano-PetrukioBronze ContributorIf it worked, please hit the like button and flag the post as solved.
- DuyTanCopper ContributorGood Idea
but i want the image to be in the cell, do you have a better solution?