I have code that inserts, formats and organizes several pictures into a spreadsheet. I use the following code:
where shtSiteVisuals is the name of the sheet.
The code inserts the pictures but also creates a link so that if the pictures are moved to a different location they will no longer appear in the spreadsheet. When I insert a picture using the Insert feature in the workbook it inserts without the link, so that if the picture is moved from it's current location then the picture remains in the worksheet. Curiously, when I tested inserting using the macro recorder and tried a simple Insert then tried Link to File and tried Insert and Link, the code for each operation is exactly the same (see above).
How can I do a simple insert via code without creating a link that can be broker?
Thanks in advance for any help.
VBA Code:
shtSiteVisuals.Pictures.Insert
where shtSiteVisuals is the name of the sheet.
The code inserts the pictures but also creates a link so that if the pictures are moved to a different location they will no longer appear in the spreadsheet. When I insert a picture using the Insert feature in the workbook it inserts without the link, so that if the picture is moved from it's current location then the picture remains in the worksheet. Curiously, when I tested inserting using the macro recorder and tried a simple Insert then tried Link to File and tried Insert and Link, the code for each operation is exactly the same (see above).
How can I do a simple insert via code without creating a link that can be broker?
Thanks in advance for any help.