PDA

View Full Version : invisible window



lior03
11-04-2007, 06:12 AM
hello
i built this code in order to hide or show the current window.

Sub togglewindownow()
If ActiveWindow.Visible = False Then
ActiveWindow.Visible = True
Else
ActiveWindow.Visible = False
End If
End Sub


as a result i lost all my sheets.how can i regain them?
thanks

XLGibbs
11-04-2007, 07:42 AM
You mean all your worksheets are now visible = FALSE?

Sub oops()
For each worksheet in ThisWorkbook.Worksheets
worksheet.visible = true
Next worksheet
End sub

might get them visible again.

Andy Pope
11-04-2007, 08:13 AM
This in the immediate window will make the workbooks visible again.


for each win in application.windows:win.Visible = true:next win