LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
ditchy
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Enable/Disable Macro pop-up when file opens steve Excel Worksheet Functions 3 April 12th 05 04:50 PM
macro to hide rows david Excel Discussion (Misc queries) 3 April 8th 05 03:25 PM
Sheets Skip Macro NICK Excel Discussion (Misc queries) 2 February 11th 05 07:16 AM
Macro for moving sheets minhao Excel Discussion (Misc queries) 3 December 10th 04 08:09 AM
Macro to hide rows with empty cells tp58tp Excel Worksheet Functions 2 November 13th 04 02:01 PM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"