ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stuck myself - can't bring back very hidden (https://www.excelbanter.com/excel-programming/272315-re-stuck-myself-cant-bring-back-very-hidden.html)

Ed[_9_]

Stuck myself - can't bring back very hidden
 
That did it! Thank you!

Ed


"Abdul Salam" wrote in message
...
Try something like this:


choice = MsgBox("Click to View Data", vbOKOnly)
If choice = vbOK Then

Sheets("Sheet1").Visible = True

Sheets("Sheet1").Activate

Sheets("Sheet3").Visible = False

Abdul Salam

-----Original Message-----
I have the following code:



Private Sub Workbook_Open()

If ActiveWorkbook.ReadOnly = False Then

ThisWorkbook.Saved = True

ThisWorkbook.ChangeFileAccess xlReadOnly

End If



Worksheets("Sheet1").Visible = xlVeryHidden

Worksheets("TIRs").Visible = xlVeryHidden



If MsgBox("Click to View Data", vbOKOnly) = vbYes Then

Sheets("Sheet1").Visible = True

Sheets("Sheet1").Activate

Sheets("Sheet3").Visible = False

End If



End Sub



The message box pops up, but nothing happens when I

click the Yes button on
the message box.



What did I do wrong?



Ed


.





All times are GMT +1. The time now is 03:23 PM.

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