LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems with vb.veryhidden

Please help!

I am trying to very hide every worksheet in this workbook except for 3- one called RegionalControl, RegionalHelp, and one containing the word competition. Every time the code executes, it tells me it is unable to set the visible property. Here is my code:

Dim curwkbk As Workbook
Set curwkbk = ThisWorkbook
Dim wks As Worksheet
Dim wksname As String

For Each wks In curwkbk.Worksheets
wksname = wks.Name
If LCase(wks.Name) Like "*total*" Then
Worksheets(wksname).Visible = xlSheetVeryHidden
ElseIf LCase(wks.Name) Like "*Competition*" Then
'nothing
ElseIf wks.Name = "RegionalControl" Then
'nothing
ElseIf wks.Name = "RegionalHelp" Then
'nothing
Else
Worksheets(wksname).Visible = xlSheetVeryHidden
End If

Next wks

Thanks for any help you can give me!


 
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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Unable to password-protect "VeryHidden" worksheet exalan New Users to Excel 4 May 9th 09 08:13 AM
Sheet hidden and VeryHidden Marc Excel Discussion (Misc queries) 6 March 29th 05 12:33 AM
Accessing a "veryhidden" sheet Bob Phillips[_5_] Excel Programming 0 August 18th 03 06:00 PM
Stuck myself - can't bring back "VeryHidden" Ed[_9_] Excel Programming 3 July 22nd 03 03:42 AM


All times are GMT +1. The time now is 05:34 PM.

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

About Us

"It's about Microsoft Excel"