Home |
Search |
Today's Posts |
#9
![]() |
|||
|
|||
![]()
Thank you Bob
will give this a try your help is much appreciated regards ditchy Bob Phillips wrote: Try this Sub HideSheets() For Each sh In Activeworkbook.Worksheets If sh.Name < "some name" And sh.Name < "some other name" Then sh.Visible = xlSheetVeryHidden End If Next sh End Sub Sub ShowSheets() Dim sPass sPass = Inputbox ("Supply password") If sPass = "abc" Then For Each sh In Activeworkbook.Worksheets sh.Visible = xlSheetVisible Next sh End If End Sub -- HTH Bob Phillips "ditchy" wrote in message oups.com... Hi Bob, tried it again but it comes up with an error (unable to set the visable property of the worksheet class) (run-time error 1004), and also hides an extra sheet when password is entered. The sheets can still be accessed by Format /sheet /unhide,hide. not sure what to do from here, suggestions? regards Ditchy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide Enable/Disable Macro pop-up when file opens | Excel Worksheet Functions | |||
macro to hide rows | Excel Discussion (Misc queries) | |||
Sheets Skip Macro | Excel Discussion (Misc queries) | |||
Macro for moving sheets | Excel Discussion (Misc queries) | |||
Macro to hide rows with empty cells | Excel Worksheet Functions |