Hi,
I am making a sheet where a user enters 8 pictures on a page, the images are inserted using a button with the following code:
Basically, I am having problems with the images, in that some of the images sometimes give the message "The linked image cannot be displayed. The file may have been moved, renamed or deleted. Verify that the link points to the correct file and location." I get that most of the time due to renaming folders etc. But a couple of times I have had it randomly lose track of images with no explanation. I realised that simply deleting the image and then pressing undo resets the link somehow but don't know how I would do this manually.
I was basically hoping to find a way to make the links search relative to the excel sheets location. For example, if the image was initially stored in C:\Users\User\Documents\Img1234, but then moved into a new folder S:\SharedFolder\User\JobName\Images\Img1234. The images will always be moved somewhere in the "JobName" folder, normally in the images folder. But just in case, I was thinking maybe to get some module/function to search the whole folder where the excel sheet is saved for the linked Image, to replace the link. The problem is, I don't know if excel stores the path links anywhere that I can access. I have searched all day on the internet and haven't gotten anywhere. Probably my best idea is to store each images file location on another sheet when it is imported and then code for the "Change Picture" function with the associated filename.
The potential problem with this method is I would want to loop through the images on each worksheet to find any where the links need refreshing an I don't know if there is any way of identifying which ones are broken. I would want this to run every time you open the spreadsheet. Could someone let me know if this is a method that would even work and is it the most efficient method? and if its not could you attempt to point me in the right direction please.
Thanks in Advance for any responses
Bookmarks