• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pictures saving as link

mrzoogle

Member
Hi,


My apologies for posting this on wrong one.


I am using a VBA to add multiple images in a specific column and at first it seems ok but once you save the spreadsheet and remove the original folder (or send it to someone else) where the images were, the images in the spreadsheets are gone replaced by this message " The linked images cannot be displayed.......". This is a very serious issue for me because there are few ocassions it worked like a charm but most of the time there is an error. I really need to solve this issue asap. Looking forward to your suggestions.


Thanks :)
 
In the VBA to add the images, are you perhaps accidentally creating the link?
 
For i = LBound(Filename) To UBound(Filename)

With curWks.Cells(i + 1, 2)

Set myPict = .Parent.Pictures.Insert(Filename(i))

(few codes for alignment)

End With


Next i


I am using this to insert pictures using loop as i, so that i'll add multiple images. This is really weird as it worked before without any problems (at the beginning it had problems though). Now whenever you add pictures and delete the source or move the source folder it shows " The linked image cannot be displayed. The file may have been deleted......".

I am not very good with Macro's but what i did was after the looping i wrote a code to copy the activesheet pictures and paste. Very weirdly it worked but with a big problem. Now all the pictures are grouped together !!


lol i just send the exect spreadsheet to my friend and it worked at his machine (same excel version 2010). This is making me crazy !!


Thanks for the help Mr Luke :)
 
Do the places where it gives the error messages have access to the image files? By that I mean, could you pull up the image from the computer accessing the Excel file indepenently of the Excel file? This often happens with PowerPoint when images aren't actually saved but are simply inserted as copies. Though it sounds like the error is sporadic.
 
Looks like you are right OleMiss2010. They are not saved as images and being saved as links.

I was wondering could we use something similar to this to force excel to embed the images within the document ?


Save With Document:=True


Or is there anyway we could modify this code to make it work normal ?


For i = LBound(Filename) To UBound(Filename)

With curWks.Cells(i + 1, 2)

Set myPict = .Parent.Pictures.Insert(Filename(i))

(few codes for alignment)

End With


Next i


Thank's for your time !
 
Back
Top