Refreshing Linked Picture
Hi Rich: Don't know how to refresh a link when it is in a Shape as the
container, but it can be done when it is in an OLEObject instead. To add it
you would use:
ActiveSheet.OLEObjects.Add Filename:="FilePath", Link:= True,
DisplayAsIcon:=False ' substitute your picture's file path for FilePath
Then to update the link it is just
ActiveSheet.OLDObjects(n).Update ' substitute the proper index for n
And to insert it through Excel's GUI, it is Insert... Object... Create From
File, then Browse for the file and check off the "link to file" checkbox
"Rich" wrote:
Hi,
I have inserted a picture using VBA with
Shapes.AddPicture() and set the linked to Shapes.AddPicture and set the
linked parameter to msoTrue.
This causes the image to refresh whenever the workbook is opened.
1) How can I FORCE a refresh??
2) BTW, is there any way to insert a linked picture through the Excel GUI?
TIA
Rich
|