Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Sheets - xlVeryHidden


Hi Guys
Excel 2003
A couple of sheets in my workbook contains confidential information.
Acess to these sheets is only possible via a password with the
following example:

Public Sub GoMenSh()
'Go to menusheet
If Sheets("MenuSheet").Visible = xlVeryHidden Then
GetPassw
ThisWorkbook.Worksheets("MenuSheet").Visible = True
Sheets("MenuSheet").Activate
Else
Sheets("MenuSheet").Select
End If
End Sub

I want to modify this code and delete the "else" section which means
that the user must always supply the password in order to get acess.
Once another sheet is selected, the confidential sheet should return
to its "xlVeryHidden" state.

Im sure this is possible via the sheet's code - similar to the statement
Before_closure, Im not sure how to do this.

As always, any assistance will be appreciated.
PS - I've got the option for user to select "hide sheet" ,via code but would
like to "automate" this in case he does not select it.
--
HJN
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Sheets - xlVeryHidden


Hi Hennie

Try the 'Deactiviate' event of the confidential sheet as below

Private Sub Worksheet_Deactivate()
Me.Visible = xlVeryHidden
End Sub

If you are keeping this sheet always hidden then replace your existing code
to get the password first and then..activate the sheet as below. Hope you
have some other sheet which is always visible.

Public Sub GoMenSh()
GetPassw
ThisWorkbook.Worksheets("MenuSheet").Visible = True
Sheets("MenuSheet").Activate
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Hennie Neuhoff" wrote:

Hi Guys
Excel 2003
A couple of sheets in my workbook contains confidential information.
Acess to these sheets is only possible via a password with the
following example:

Public Sub GoMenSh()
'Go to menusheet
If Sheets("MenuSheet").Visible = xlVeryHidden Then
GetPassw
ThisWorkbook.Worksheets("MenuSheet").Visible = True
Sheets("MenuSheet").Activate
Else
Sheets("MenuSheet").Select
End If
End Sub

I want to modify this code and delete the "else" section which means
that the user must always supply the password in order to get acess.
Once another sheet is selected, the confidential sheet should return
to its "xlVeryHidden" state.

Im sure this is possible via the sheet's code - similar to the statement
Before_closure, Im not sure how to do this.

As always, any assistance will be appreciated.
PS - I've got the option for user to select "hide sheet" ,via code but would
like to "automate" this in case he does not select it.
--
HJN

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Sheets - xlVeryHidden


Depending on how confidential your information is, it's worth remembering
that the contents of very hidden sheets can be exposed if the Excel file is
opened using Word.

"Hennie Neuhoff" wrote:

Hi Guys
Excel 2003
A couple of sheets in my workbook contains confidential information.
Acess to these sheets is only possible via a password with the
following example:

Public Sub GoMenSh()
'Go to menusheet
If Sheets("MenuSheet").Visible = xlVeryHidden Then
GetPassw
ThisWorkbook.Worksheets("MenuSheet").Visible = True
Sheets("MenuSheet").Activate
Else
Sheets("MenuSheet").Select
End If
End Sub

I want to modify this code and delete the "else" section which means
that the user must always supply the password in order to get acess.
Once another sheet is selected, the confidential sheet should return
to its "xlVeryHidden" state.

Im sure this is possible via the sheet's code - similar to the statement
Before_closure, Im not sure how to do this.

As always, any assistance will be appreciated.
PS - I've got the option for user to select "hide sheet" ,via code but would
like to "automate" this in case he does not select it.
--
HJN

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
xlVeryHidden Mike H. Excel Programming 5 November 10th 08 07:35 PM
Xlveryhidden K1KKKA Excel Discussion (Misc queries) 9 October 6th 07 04:19 AM
opposite of XLVeryhidden!! roshinpp_77[_5_] Excel Programming 4 June 5th 06 12:54 PM
XLVERYHIDDEN Sunil Patel Excel Programming 1 July 13th 05 10:41 PM
xlVeryHidden Resolution kevin Excel Programming 1 June 2nd 04 01:08 AM


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