Consulting

Results 1 to 3 of 3

Thread: invisible window

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    invisible window

    hello
    i built this code in order to hide or show the current window.
    [VBA]
    Sub togglewindownow()
    If ActiveWindow.Visible = False Then
    ActiveWindow.Visible = True
    Else
    ActiveWindow.Visible = False
    End If
    End Sub

    [/VBA]
    as a result i lost all my sheets.how can i regain them?
    thanks
    moshe

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    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.
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  3. #3
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    This in the immediate window will make the workbooks visible again.

    [vba]
    for each win in application.windows:win.Visible = true:next win
    [/vba]
    Cheers
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •