21 | 08 | 2017

Show Hide All Shapes on a Worksheet

The code below hides all shapes on a worksheet. The code below is filtered in only hiding AutoShapes. For more shapetypes check this article.

Sub ShowAllAutoShapes()
'*************************************
'**** Code from VisibleVisual.com ****
'*************************************
Dim sShapes As Shape
For Each sShapes In ActiveSheet.Shapes
If sShapes.Type = 1 Then 'This 1 filters only autoshapes
sShapes.Visible = msoTrue
End If
Next sShapes
End Sub

 

Sub HideAllAutoShapes()
'*************************************
'**** Code from VisibleVisual.com ****
'*************************************
Dim sShapes As Shape
For Each sShapes In ActiveSheet.Shapes
If sShapes.Type = 1 Then 'This 1 filters only autoshapes
sShapes.Visible = msoFalse
End If
Next sShapes
End Sub

Download the sample sheet below. 

Login

Sign up now and upload your code to the website.

Help us to continue.....
Statistics
Articles View Hits
2330599
Latest Articles