ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stuck myself - can't bring back "VeryHidden" (https://www.excelbanter.com/excel-programming/272259-stuck-myself-cant-bring-back-veryhidden.html)

Ed[_9_]

Stuck myself - can't bring back "VeryHidden"
 
I coded a Workbook_Open event that included
Worksheets("Sheet1").Visible = xlVeryHidden
Worksheets("TIRs").Visible = xlVeryHidden
leaving Sheet3 visible. I have a Command button on Sheet3 that is supposed
to unhide Sheet1 and make Sheet3 VeryHidden, leaving TIRs VeryHidden. But I
can't make it work!

Some thoughts - but I don't know if they have any significance:
* The Open event is in ThisWorkbook, but the CommandButton1 is in Sheet3
* The code for the button is trying to VeryHide the sheet the button is
on, which includes the code module

I've tried just about every combination of commands from the NG and the help
files, and even had a VB programmer standing here - but it won't go! Can
someone please point me in the right direction?

Ed



Dan E[_2_]

Stuck myself - can't bring back "VeryHidden"
 
Ed,

I couldn't reproduce your problem, maybe if you posted your code someone
would be able to help more easily.

Dan E

"Ed" wrote in message
...
I coded a Workbook_Open event that included
Worksheets("Sheet1").Visible = xlVeryHidden
Worksheets("TIRs").Visible = xlVeryHidden
leaving Sheet3 visible. I have a Command button on Sheet3 that is

supposed
to unhide Sheet1 and make Sheet3 VeryHidden, leaving TIRs VeryHidden. But

I
can't make it work!

Some thoughts - but I don't know if they have any significance:
* The Open event is in ThisWorkbook, but the CommandButton1 is in Sheet3
* The code for the button is trying to VeryHide the sheet the button is
on, which includes the code module

I've tried just about every combination of commands from the NG and the

help
files, and even had a VB programmer standing here - but it won't go! Can
someone please point me in the right direction?

Ed





John[_37_]

Stuck myself - can't bring back "VeryHidden"
 
Ed, I might miss the problem but this worked on my system:

Sub test() ' in module
Worksheets("Sheet1").Visible = True
Worksheets("Sheet3").Visible = xlVeryHidden
End Sub

Private Sub Workbook_Open() 'in this workbook
Worksheets("Sheet1").Visible = xlVeryHidden
Worksheets("TIRs").Visible = xlVeryHidden
End Sub

John

-----Original Message-----
I coded a Workbook_Open event that included
Worksheets("Sheet1").Visible = xlVeryHidden
Worksheets("TIRs").Visible = xlVeryHidden
leaving Sheet3 visible. I have a Command button on

Sheet3 that is supposed
to unhide Sheet1 and make Sheet3 VeryHidden, leaving TIRs

VeryHidden. But I
can't make it work!

Some thoughts - but I don't know if they have any

significance:
* The Open event is in ThisWorkbook, but the

CommandButton1 is in Sheet3
* The code for the button is trying to VeryHide the

sheet the button is
on, which includes the code module

I've tried just about every combination of commands from

the NG and the help
files, and even had a VB programmer standing here - but

it won't go! Can
someone please point me in the right direction?

Ed


.


Lynn Schauer

Stuck myself - can't bring back "VeryHidden"
 
open the workbook with the veryhidden sheet, then run the following macro:

sub unhide()
for each x in activeworkbook.sheets
x.visible = true
next x
end sub

Lynn S
"Ed" wrote in message
...
I coded a Workbook_Open event that included
Worksheets("Sheet1").Visible = xlVeryHidden
Worksheets("TIRs").Visible = xlVeryHidden
leaving Sheet3 visible. I have a Command button on Sheet3 that is

supposed
to unhide Sheet1 and make Sheet3 VeryHidden, leaving TIRs VeryHidden. But

I
can't make it work!

Some thoughts - but I don't know if they have any significance:
* The Open event is in ThisWorkbook, but the CommandButton1 is in Sheet3
* The code for the button is trying to VeryHide the sheet the button is
on, which includes the code module

I've tried just about every combination of commands from the NG and the

help
files, and even had a VB programmer standing here - but it won't go! Can
someone please point me in the right direction?

Ed






All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com