+ Reply to Thread
Results 1 to 2 of 2

vba to make visible 1 or 2 or both worksheets depending if 1 or 2 or both cells selected

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    vba to make visible 1 or 2 or both worksheets depending if 1 or 2 or both cells selected

    I have a workbook with 6 sheets. First sheet has 2 cells, which if I put a check in A1, this is also reflected in sheets2, 3 and 4. Same with cell A2. If I select A1 on ANY of the four sheets, then I want sheet5 to be visible and remain visible until none of the A1 cells are checked. This I have figured out by using an "IF" statement off to the side, giving each cell a value of 1 for each sheet and then in the macro, if the sum of the "IF's" is >= to 1, then sheet5 remains visible. Now the problem. Now I have A2, which if I put a checkmark in it, then I want sheet6 to be visible, which is fine, I can do the same with it as sheet5. But how do I tie the two together, so that if any A1 on sheets1-4 and A2 on sheet1 is checked, then both sheet5 and sheet6 are visible? Of course when A2 on sheet1 and all of the A1's are not checked, both sheets must not be visible, but I can figure that out from the one macro, just reverse it. Any ideas how to make this happen?? Thanks for the help folks!
    Last edited by thecdnmole; 11-11-2014 at 09:19 PM.

  2. #2
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: vba to make visible 1 or 2 or both worksheets depending if 1 or 2 or both cells select

    I've been trying to use "IF" and nested "IF's" to no avail. Maybe "case/select" would be the way to make it work? I have not used that, but looks like I will have to give it a try.

+ 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. [SOLVED] All worksheets are not visible. Can't make them visible.
    By verdugan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2012, 01:19 PM
  2. [SOLVED] Selected cells not visible
    By LAUR in forum Excel General
    Replies: 1
    Last Post: 05-15-2006, 02:45 PM
  3. [SOLVED] contents in cells are not visible when word wrap is selected
    By Steve in forum Excel General
    Replies: 2
    Last Post: 01-06-2006, 08:40 PM
  4. Make selected row visible to user when out of screen view
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2005, 08:05 AM
  5. Checklist to make worksheets visible
    By Kent McPherson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2005, 05:05 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