Avatar of jnash67
jnash67
 asked on

How can I programmatically change the image of an existing picture in an Excel sheet with the image from a new gif file

I have a picture object in a sheet.  I need to have a different image there depending on some conditions.  I have tried changing it with:

reportSheet.Pictures("Logo") = LoadPicture("C:\Temp\New Logo.gif")

But the object doesn't seem to support this.  How can I do this?
Visual Basic ClassicMicrosoft Excel

Avatar of undefined
Last Comment
Rory Archibald

8/22/2022 - Mon
Hitesh Manglani

Rory Archibald

If you are using a picture from the Drawing toolbar, you could just delete it and add a new one?
jnash67

ASKER
Rory -- how would I do this while maintaining the exact size and location of the existing image?
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
Rory Archibald

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.