Help! Hide a picture using vba?

graviz

Board Regular
Joined
Mar 19, 2009
Messages
93
I'm trying to hide/unhide a picture I imported into an excel spreadsheet. Right now I'm just working on hiding it. Here is the code I've been trying to use:

ActiveSheet.msoPicture("Picture59_Click").Visible = False

Any ideas?:confused:

Thanks
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Is it?

ActiveSheet.Pictures("Picture59_Click").Visible = False

If it doesn't work check that you have the right name.
 
Upvote 0
I tried the code and I'm getting a "Run-time error '1004': Unable to get the Pictures property of the Worksheet class"
 
Upvote 0
Should the name of the picture be the name of the actual picture I import? Do I need in include the .jpg?
 
Upvote 0
It looks like I used an underscore instead of a space. It works perfectly now. Thanks for your help!!!
 
Upvote 0
hi. what about all instances of a particular image, which is shown multiple times in the same worksheet?
It cant be all images in the worksheet, because i've got some different ones i want to retain.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,273
Members
448,559
Latest member
MrPJ_Harper

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top