Insert Picture based on hyperlink/file location from another sheet in an Excel workbook
Posted on 2014-07-14
I am wanting to do something that seems simple but i am unable to find any solutions on the internet so it may not even be possible. I have an excel sheet that contains a list of hyperlinks for pictures. For Example, cell C2 would have a hyperlink, C3 would have a hyperlink, etc etc. We have another sheet in the same workbook that we want to show the picture from the sheet that has the hyperlinks. The theory behind this is we want someone to look at the sheet of picture data that has the hyperlinks, and the other sheet actually show the pictures so we can print it for a photo log in a report. Right now we are creating the hyperlinks and then manually having to Insert each Picture into each cell for the photo log. Since i already have the hyperlink to the picture, is there a way to tell a cell to show the picture based on the hyperlink, instead of having to manually go to Insert, Picture.
I can sort of do what I am wanting using vba and a image active X control but it is not automatically updating the pictures. It also will not automatically change the pictures when i update the data path in the cell. For example, I have the image path saved in cell A1 and A2. I have 2 different image controls. A1 is set to imagecontrol 1 and A2 is set to Imagecontrol 2. I can get the pics to show up but if i make any changes to A1 and A2, the pics do not change. This is the example I have of my code.
Image2.Picture = LoadPicture(Range("A1").Value)
I have placed it in _click(), _GotFocus(), but neither places will allow it to change and update automatically.