Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following to ask the user to log in to show their specific
worksheet in a workbook and hide the rest. This is activated when they click the OK button in a form that pops up when Excel opens: bOK2Use = False bError = True If Len(txtUser.Text) 0 And Len(txtPass.Text) 0 Then bError = False Select Case txtUser.Text Case "userMe" sSName = "Me" If txtPass.Text < "nascar05" Then bError = True Case "weng" sSName = "Mine" If txtPass.Text < "nascar07" Then bError = True Case Else bError = True End Select End If If bError Then MsgBox "Invalid User Name or Password" Else 'Set document property bSetIt = False For Each p In ActiveWorkbook.CustomDocumentProperties If p.Name = "auth" Then p.Value = sSName bSetIt = True Exit For End If Next p If Not bSetIt Then ActiveWorkbook.CustomDocumentProperties.Add _ Name:="auth", LinkToContent:=False, _ Type:=msoPropertyTypeString, Value:=sSName End If Sheets(sSName).Visible = True Sheets(sSName).Unprotect (txtPass.Text) Sheets(sSName).Activate bOK2Use = True Unload UserForm1 End If My question is, how can I modify this so that a manager can log in and see ALL worksheets, i.e., unhide all worksheets, without getting the "you're not authorized to view" message? Any help is greatly appreciated. Thank you!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003: Formulas in Series of Worksheets | Excel Discussion (Misc queries) | |||
Alphabetizing mulitiple worksheets in Excel 2003? | Excel Discussion (Misc queries) | |||
Excel 2003 - Copying formatting through 12 worksheets | Excel Discussion (Misc queries) | |||
Many worksheets; Same formatting - Excel 2003 | Excel Discussion (Misc queries) | |||
Can I open Corel Quattro Pro 12 Worksheets in Excel 2003 XP | Charts and Charting in Excel |