Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default 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   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default 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
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
keeping dates in cells hidden ramona Excel Discussion (Misc queries) 2 March 23rd 09 09:40 PM
How to make hidden sheet invisible LLee2 New Users to Excel 9 April 8th 07 06:58 AM
Keeping a workbook hidden when opened via VBA??? Simon Lloyd[_585_] Excel Programming 3 October 6th 04 03:21 PM
Keeping a workbook hidden when opened via VBA??? Simon Lloyd[_586_] Excel Programming 0 October 6th 04 03:16 PM
keeping rows hidden in outline Tim McPhillips Excel Programming 0 September 2nd 03 05:22 PM


All times are GMT +1. The time now is 09:20 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"