VBA to Unhide Worksheet on a tool bar custom icon


Posted by Steve on April 16, 2001 3:46 PM

I've created custom tool bar icons to hide and unhide rows and columns and I can even hide worksheets. What I can't seem to figure out is the code to unhide a hidden worksheet. I want the application to be generic so that the worksheet returns the list of hidden tabs. Any ideas?

Sub WKS_Hide()
'
' WKS_Hide Macro
'
'
ActiveWindow.SelectedSheets.Visible = False

End Sub



Posted by R. Shipton on April 16, 2001 4:22 PM

WKS_Hide Macro


Steve
If you want to unhide a particular sheet :
Worksheets("sheetname").Visible = True
or
Worksheets(number).Visible = True

If you want to unhide all sheets in the workbook :
Dim ws As Worksheet
For Each ws In Worksheets
ws.Visible = True
Next

RS