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: 573
Default Worksheet excluded doesn't exclude

This is part of some code I wrote to limit acess to some spreadsheets.
It's supposed to ignore the sheet "(Code Key)". But it still asks for a
password.

Private Sub Workbook_SheetChange(ByVal ws As Object, ByVal Target As
Range)
Dim sShName As String

For Each ws In ActiveWorkbook.Worksheets
If Right(ws.Name, 7) < "Monthly" Then 'ignore these sheeets
Select Case ws.Name
Case "(Code Key)" 'Excluded sheets
Exit Sub

Case Else 'if password hasn't been entered yet, then ask
for password
If bPwrdEntrd = False Then

Call PasswordEntry
End If
End Select
End If
Next
End Sub

I tried using CodeName instead of sheet name, but that didn't work
either. Does anyone see what is wrong?

Thanks again.

 
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
Copy Worksheet and Exclude Hidden fields Charles Gonzalez Excel Worksheet Functions 3 August 12th 08 12:31 AM
finding cells excluded by autofilter wbiskit Excel Programming 1 August 23rd 06 05:48 PM
HOW DO I TOTAL A FILTERED LIST TO EXCLUDE THOSE EXCLUDED BY FILTE. paul abc Excel Worksheet Functions 2 August 11th 05 07:37 PM
Is there a function that allows me to list the names of excluded d Flutie99 Excel Worksheet Functions 1 June 1st 05 01:34 AM
HOW DO I EXCLUDED A FIGURE FROM A CONDITIONAL FORMAT???? [email protected] Excel Worksheet Functions 1 April 14th 05 10:14 PM


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

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"