Hide/Unhide an Autoshape or Picture in Excel [Solved/Closed]

madambath - May 10, 2010 at 07:23 AM - Latest reply:  jerangkung
- Nov 7, 2013 at 04:08 AM
Hi All,

Could anyone tell me the method to Hide/Unhide an Autoshape or Picture in Excel Spreadsheet? I know it is possible through Macro Codes, any other usual ways like hiding Columns, Rows or Sheets?

With regards,
PramodKumar
See more 

6 replies

Best answer
rizvisa1 4482 Posts Thursday January 28, 2010Registration dateContributorStatus January 6, 2016 Last seen - May 10, 2010 at 08:16 AM
7
Thank you
Use the properties
.visible = true and .visible = false

ActiveSheet.Pictures("Picture 2").Visible = True

Thank you, rizvisa1 7

Something to say? Add comment

CCM has helped 1915 users this month

2
Thank you
Thank you, this requires to execute the Code to do the job. What I need is when the file is opened the Sheet should not show some of the Autoshapes or Pictures in the sheet and keeps some other hidden.

When I run my other Marcos these Autoshapes or Pictures will be Unhide or deleted.

In this scenario if I used the Code to hide Autoshapes or Pictures in the WorksheetOpen event and executed all my other macros in the files and saved the resulting file as a "New File" and when I go back to open the "New File" some errors will be shown due to the WorksheetOpen event Code.

I hope you may understood (blame my poor language) my problem.

Thanks and Regards,
PramodKumar
rizvisa1 4482 Posts Thursday January 28, 2010Registration dateContributorStatus January 6, 2016 Last seen - May 11, 2010 at 06:08 AM
Why not enclose the part of making it visible, hidden or delete sandwiched bewteeen

On Error Resume Next

On Error goto 0
1
Thank you
Once again you did it for me! Wonderful tip, Thanks a lot.

Now my Code looks as below:

Private Sub Workbook_Open()

On Error Resume Next
ActiveSheet.Shapes("Button08").Visible = False
ActiveSheet.Shapes("Button09").Visible = False
ActiveSheet.Shapes("Button10").Visible = False
ActiveSheet.Shapes("Button 55").Visible = False
ActiveSheet.Shapes("Button 56").Visible = False
ActiveSheet.Shapes("Button 57").Visible = False
ActiveSheet.Shapes("Button 64").Visible = False
ActiveSheet.Shapes("Button 65").Visible = False
ActiveSheet.Shapes("Button 66").Visible = False
ActiveSheet.Shapes("Button 67").Visible = False
ActiveSheet.Shapes("Button 74").Visible = False
On Error GoTo 0

End Sub

With Regards,
PramodKumar
rizvisa1 4482 Posts Thursday January 28, 2010Registration dateContributorStatus January 6, 2016 Last seen - May 11, 2010 at 07:57 AM
Superb. And thanks for posting your solution. It just might help some one else too.
0
Thank you
is there other ways that does not involve coding....such as settings?