Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Hide a Sheet Q

I thought the XLVeryhidden function hides a sheet from been unhidden
via Format-Sheet-Unhide and could only be unhidden via code.

Does the Workbook or Sheet have to be protected also?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Hide a Sheet Q

Sean,
With this code and no Protection:

Private Sub CommandButton1_Click()
Worksheets(2).Visible = xlVeryHidden
Worksheets(3).Visible = xlHidden
End Sub

I only see Worksheet 3 in the list of FormatSheetUnhide.

I the use run suitable code, then can unhide Worksheet 3 though.

NickHK

"Sean" wrote in message
ups.com...
I thought the XLVeryhidden function hides a sheet from been unhidden
via Format-Sheet-Unhide and could only be unhidden via code.

Does the Workbook or Sheet have to be protected also?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Hide a Sheet Q

That should read:
"If the user runs suitable code, they can unhide Worksheet 2 though."

NickHK

"NickHK" wrote in message
...
Sean,
With this code and no Protection:

Private Sub CommandButton1_Click()
Worksheets(2).Visible = xlVeryHidden
Worksheets(3).Visible = xlHidden
End Sub

I only see Worksheet 3 in the list of FormatSheetUnhide.

I the use run suitable code, then can unhide Worksheet 3 though.

NickHK

"Sean" wrote in message
ups.com...
I thought the XLVeryhidden function hides a sheet from been unhidden
via Format-Sheet-Unhide and could only be unhidden via code.

Does the Workbook or Sheet have to be protected also?

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Hide a Sheet Q

Thanks Nick

I had this code for Worksheet open

Worksheets(1).Visible = False

Having already xlVeryhidden all sheets except for one when closing.
When I opened the worksheet was not aware that the above would overide
and hence not be visible but show the sheet in Format-Sheet-Unhide


On Jan 30, 8:31 am, "NickHK" wrote:
Sean,
With this code and no Protection:

Private Sub CommandButton1_Click()
Worksheets(2).Visible = xlVeryHidden
Worksheets(3).Visible = xlHidden
End Sub

I only see Worksheet 3 in the list of FormatSheetUnhide.

I the use run suitable code, then can unhide Worksheet 3 though.

NickHK

"Sean" wrote in oglegroups.com...



I thought the XLVeryhidden function hides a sheet from been unhidden
via Format-Sheet-Unhide and could only be unhidden via code.


Does the Workbook or Sheet have to be protected also?


Thanks- Hide quoted text -- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Hide a Sheet Q

Sean,
Checking the values of the settings in the Immediate window gives:

?xlsheethidden
0
?xlsheetveryhidden
2
?xlSheetVisible
-1

So you can see the 2 lines of code are exactly the same:
Worksheets(1).Visible = False
Worksheets(1).Visible = xlSheetHidden

NickHK

"Sean" wrote in message
ps.com...
Thanks Nick

I had this code for Worksheet open

Worksheets(1).Visible = False

Having already xlVeryhidden all sheets except for one when closing.
When I opened the worksheet was not aware that the above would overide
and hence not be visible but show the sheet in Format-Sheet-Unhide


On Jan 30, 8:31 am, "NickHK" wrote:
Sean,
With this code and no Protection:

Private Sub CommandButton1_Click()
Worksheets(2).Visible = xlVeryHidden
Worksheets(3).Visible = xlHidden
End Sub

I only see Worksheet 3 in the list of FormatSheetUnhide.

I the use run suitable code, then can unhide Worksheet 3 though.

NickHK

"Sean" wrote in

oglegroups.com...



I thought the XLVeryhidden function hides a sheet from been unhidden
via Format-Sheet-Unhide and could only be unhidden via code.


Does the Workbook or Sheet have to be protected also?


Thanks- Hide quoted text -- Show quoted text -




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
Create Sheet, Hide Sheet Dave Excel Discussion (Misc queries) 2 October 30th 07 03:40 PM
Hide Sheet If.... JPAUL Excel Programming 6 August 19th 04 09:57 PM
hide sheet Jeff Excel Programming 1 June 9th 04 07:55 PM
hide sheet? uncheck sheet tabs? or ??? NetComm888 Excel Programming 1 February 10th 04 04:38 AM
Hide Sheet Bob Phillips[_5_] Excel Programming 2 August 7th 03 01:40 PM


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