+ Reply to Thread
Results 1 to 5 of 5

Thread: Sheet tabs.

  1. #1
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66

    Sheet tabs.

    Friends,

    How do I hide and unhide sheet names programmatically? Any clue?

    Regards,
    Gajendra Gupta

  2. #2
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472
    Hi,

        Sheets("Sheet name").Visible = True
    
    
        Sheets("Sheet name").Visible = False
    Please disregard anything in the above post. It may well have been edited without my consent, as has been the case with several posts and threads recently.

  3. #3
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66
    No, it doesn help me. it just visibles the sheets. I want sheet tabs to hided or visible.

    Regards,
    Gajendra Gupta

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2006
    Location
    Ahmedabad, India
    MS-Off Ver
    Office 2000
    Posts
    345
    Quote Originally Posted by gajendra.gupta
    No, it doesn help me. it just visibles the sheets. I want sheet tabs to hided or visible.

    Regards,
    Gajendra Gupta
    No you cannot selectively hide tab for a sheet. You can however hide all tabs by
    ActiveWindow.DisplayWorkbookTabs = False
    Other work around could be to rename the sheet to " " and then back to the original name. Tricky if you are using the sheet names in your prog. If you use only indexes eg sheet(1) etc this workaround might do. code could be
    Sheets(1).Name = " "                     ' becomes invisible
    Sheets(1).Name = "OldName"           ' becomes visible
    This will ofcourse not hide the tabs but the name will be blanked out.


    A V Veerkar
    Last edited by avveerkar; 05-21-2007 at 06:43 AM.

  5. #5
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639
    This will toggle Tabs on and off

     ActiveWindow.DisplayWorkbookTabs = Not_
        ActiveWindow.DisplayWorkbookTabs
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0