Home Excel VB/VBA Show Hide All Shapes on a Worksheet
20 | 05 | 2012
This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade

Show Hide All Shapes on a Worksheet PDF Print E-mail
User Rating: / 1
PoorBest 
Tutorials

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

 

"Code"

View source
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. 

 

Add comment


Security code
Refresh

This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade