Consulting

Results 1 to 5 of 5

Thread: Solved: Get Tabs Back

  1. #1

    Solved: Get Tabs Back

    HI

    Recently I hide my tabs via some code, However I want the tabs back so I set the code to true, however this didnt bring the tabs back either, therefore I deleted the code and I still dont have tabs, help please

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Bopo, please supply the code you used to hide the sheets - reall it should be a simple as [VBA]Sheets("Sheet1").Visible = True[/VBA]

    Regards,
    Simon
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Mentor CBrine's Avatar
    Joined
    Jun 2004
    Location
    Toronto, Canada
    Posts
    387
    Location
    bopo,
    Here's an extension of Simon's code, that cycles through each sheet in a workbook and makes it visible.

    [vba]
    sub UnHideAll()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Sheets
    ws.Visible = xlSheetVisible
    Next
    End Sub
    [/vba]

    1. Open the vba editor by press Alt-F11.
    2. Using the project explorer add a module to your project.
    3. Using the Excel menu(not the vbe menu) select Tools...Macro.....Macro.
    4. Select the macro from the dialogs list and press the run button.

    HTH
    Cal
    The most difficult errors to resolve are the one's you know you didn't make.


  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    bopo, if you would provide a link to the original thread so we didn't have to search for it this would be much simpler for us and you...............
    http://www.vbaexpress.com/forum/show...6693#post86693
    post # 4
    [VBA]ActiveWindow.DisplayWorkbookTabs = False[/VBA]
    If you set it to true then your tabs will re-appear.........
    If all else fails go to tools - options....under the view tab check the sheet tabs checkbox....
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    Thanks, I needed to check the check box, thanks

Posting Permissions

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