View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed[_9_] Ed[_9_] is offline
external usenet poster
 
Posts: 194
Default 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


.