Inserting an Object in VBA

M_S_Jones

Registered User.
Local time
Today, 01:36
Joined
Jan 4, 2008
Messages
119
Hello,

I'm trying to insert an image as an object in VBA. I have the following code:

Code:
ActiveSheet.Pictures.Insert("C:\image.pcx").Select

Which inserts the image as an image, but I would ideally like to insert the image as an object. I've tried replacing the word 'Pictures' with the word 'Objects', but this doesn't work.

Thanks for any help you can offer,

Matthew
 
I've found it! This is what I was looking for:

Code:
ActiveSheet. OLEObjects.Add(Filename:= _ 
    "C:\image.pcx",  Link:=False, _ 
    DisplayAsIcon:=False).Select
Matthew
 
Last edited:

Users who are viewing this thread

Back
Top Bottom