Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invisible Worksheet - Keeping it Hidden
I am trying to make a hidden sheet viewable only with a password. Either of
the below approaches are somewhat effective except for one issue: The "active" cell address in the hidden worksheet displays as "ghosting" in the upper left corner of the window and the cell formula displays in the formula bar while Excel waits for the Password. I hate to be so fussy, but I do not like this! Is there a more professional method to keep the sheet hidden but allow it to be unhidden with a password? Thanks. '==========Alternative One============== Private Sub Workbook_SheetActivate(ByVal Sh As Object) Application.ScreenUpdating = False If Sh.Name = "KeepHidden" Then Sh.Range("IV65536").Select If InputBox("Enter Password") < "MyPassword" Then Sh.Visible = False End If End If Application.ScreenUpdating = True End Sub '==========Alternative Two -- Actually fires before Alternative One but the results are the same ============== Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) Application.ScreenUpdating = False If ActiveSheet.Name = "HiddenSheet" Then If InputBox("Enter Password") < "MyPassword" Then Sheets("HiddenSheet").Visible = False End If End If Application.ScreenUpdating = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invisible Worksheet - Keeping it Hidden
Hi William,
I would consider something like hiding the sheet (with say Sheets("Sheet1").Visible=xlSheetVeryHidden) and providing a button (either on a commmandbar or on the rest of the sheets or maybe a switchboard-type sheet). The button would ask for a password an unhide the sheet. On SheetDeactivate event of the restricted sheet I would hide it again. Regards, KL "William Benson" wrote in message ... I am trying to make a hidden sheet viewable only with a password. Either of the below approaches are somewhat effective except for one issue: The "active" cell address in the hidden worksheet displays as "ghosting" in the upper left corner of the window and the cell formula displays in the formula bar while Excel waits for the Password. I hate to be so fussy, but I do not like this! Is there a more professional method to keep the sheet hidden but allow it to be unhidden with a password? Thanks. '==========Alternative One============== Private Sub Workbook_SheetActivate(ByVal Sh As Object) Application.ScreenUpdating = False If Sh.Name = "KeepHidden" Then Sh.Range("IV65536").Select If InputBox("Enter Password") < "MyPassword" Then Sh.Visible = False End If End If Application.ScreenUpdating = True End Sub '==========Alternative Two -- Actually fires before Alternative One but the results are the same ============== Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) Application.ScreenUpdating = False If ActiveSheet.Name = "HiddenSheet" Then If InputBox("Enter Password") < "MyPassword" Then Sheets("HiddenSheet").Visible = False End If End If Application.ScreenUpdating = True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invisible Worksheet - Keeping it Hidden
Wow, I did not even know about that property. Thank you.
"KL" wrote in message ... Hi William, I would consider something like hiding the sheet (with say Sheets("Sheet1").Visible=xlSheetVeryHidden) and providing a button (either on a commmandbar or on the rest of the sheets or maybe a switchboard-type sheet). The button would ask for a password an unhide the sheet. On SheetDeactivate event of the restricted sheet I would hide it again. Regards, KL "William Benson" wrote in message ... I am trying to make a hidden sheet viewable only with a password. Either of the below approaches are somewhat effective except for one issue: The "active" cell address in the hidden worksheet displays as "ghosting" in the upper left corner of the window and the cell formula displays in the formula bar while Excel waits for the Password. I hate to be so fussy, but I do not like this! Is there a more professional method to keep the sheet hidden but allow it to be unhidden with a password? Thanks. '==========Alternative One============== Private Sub Workbook_SheetActivate(ByVal Sh As Object) Application.ScreenUpdating = False If Sh.Name = "KeepHidden" Then Sh.Range("IV65536").Select If InputBox("Enter Password") < "MyPassword" Then Sh.Visible = False End If End If Application.ScreenUpdating = True End Sub '==========Alternative Two -- Actually fires before Alternative One but the results are the same ============== Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) Application.ScreenUpdating = False If ActiveSheet.Name = "HiddenSheet" Then If InputBox("Enter Password") < "MyPassword" Then Sheets("HiddenSheet").Visible = False End If End If Application.ScreenUpdating = True End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Invisible Worksheet - Keeping it Hidden
The property setting, I meant, not the property.
"William Benson" wrote in message ... Wow, I did not even know about that property. Thank you. "KL" wrote in message ... Hi William, I would consider something like hiding the sheet (with say Sheets("Sheet1").Visible=xlSheetVeryHidden) and providing a button (either on a commmandbar or on the rest of the sheets or maybe a switchboard-type sheet). The button would ask for a password an unhide the sheet. On SheetDeactivate event of the restricted sheet I would hide it again. Regards, KL "William Benson" wrote in message ... I am trying to make a hidden sheet viewable only with a password. Either of the below approaches are somewhat effective except for one issue: The "active" cell address in the hidden worksheet displays as "ghosting" in the upper left corner of the window and the cell formula displays in the formula bar while Excel waits for the Password. I hate to be so fussy, but I do not like this! Is there a more professional method to keep the sheet hidden but allow it to be unhidden with a password? Thanks. '==========Alternative One============== Private Sub Workbook_SheetActivate(ByVal Sh As Object) Application.ScreenUpdating = False If Sh.Name = "KeepHidden" Then Sh.Range("IV65536").Select If InputBox("Enter Password") < "MyPassword" Then Sh.Visible = False End If End If Application.ScreenUpdating = True End Sub '==========Alternative Two -- Actually fires before Alternative One but the results are the same ============== Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) Application.ScreenUpdating = False If ActiveSheet.Name = "HiddenSheet" Then If InputBox("Enter Password") < "MyPassword" Then Sheets("HiddenSheet").Visible = False End If End If Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
keeping dates in cells hidden | Excel Discussion (Misc queries) | |||
How to make hidden sheet invisible | New Users to Excel | |||
Keeping a workbook hidden when opened via VBA??? | Excel Programming | |||
Keeping a workbook hidden when opened via VBA??? | Excel Programming | |||
keeping rows hidden in outline | Excel Programming |