View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Code to Hide/Unhide Worksheet

I want to do something like this

Sub HideUnhideSheets(myWS As Excel.Worksheet, myHidden As Variant)
If myWS.Visible < myHidden Then
myWS.Visible = myHidden
End If

End Sub

What I want to do is set it up so that myHidden only allows xlVisible,
xlHidden and xlVeryHidden (or whatever they are). How do I do that?

Thanks,
Barb Reinhardt