+ Reply to Thread
Results 1 to 2 of 2

Show/Hide sheets based on values of cells in a range

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Unhappy Show/Hide sheets based on values of cells in a range

    Hi I am very new to vba and I do not know how to solve this issue. I have tried to google but could not come up with anything.

    I have a workbook wherein I have 7 sheets.Lets say they are called Tom, Peter, John, Sia, Mia, Tia and "Home Page". I have 2 buttons for Report 1 and 2 to which I want to assign the macros.I also have a table wherein I have defined which sheets I want to show. First Column of table has sheet names from A2:A6(Home Page,Tom, Peter, John, Sia, Mia, Tia). Column 2 has report 1 sheets - Home Page, Tom, John, Mia and Column 3 has report 2 sheet names- Home Page, Peter, Sia, Tia

    What I want to do is, if I click on "Report 1" button, I only want to show sheets whose names are there in cells under report 1 so for report 1 it will be Home Page, Tom, John, Mia. For Report 2, it will be Home Page, Peter, Sia, Tia. Since I have many reports I want this to be one macro. Stepwise, here is what I want
    1. Click on button for Report, macro should check which report I am referring to and select the range on basis of that. Report 1 = column B, if Report 2, Range is column C.
    2. Basis the range I want sheets to show or hide.

    Please help!!!

  2. #2
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Show/Hide sheets based on values of cells in a range

    Welcome to the forums. You can use this code to setup one button to hide a sheet if its visible and vice versa.

    Please Login or Register  to view this content.
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help to show/hide rows based on values from a cell
    By concurmgr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2012, 02:56 PM
  2. [SOLVED] Show / Hide Sheets based off a cell input
    By evancharles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2012, 09:35 AM
  3. Replies: 4
    Last Post: 05-08-2012, 10:28 AM
  4. Show/hide sheets on file open based on user password
    By allar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2011, 12:41 PM

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.6.0 RC 1