+ Reply to Thread
Results 1 to 4 of 4

Conditionally Hide Excel Tabs-If they are Empty

  1. #1
    Registered User
    Join Date
    07-27-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Conditionally Hide Excel Tabs-If they are Empty

    I have seen a couple of topics similar to this, but can't quite figure it out on my own.

    I have about a dozen tabs, all of which have vlookups in them and calculate based on what a user pastes into Sheet 1. I need a macro that hides all tabs that have no data, essentially tabs where A1 = ""
    However, it also needs to unhide tabs as soon as there is data. So if the user pastes new data into Sheet 1 the vlookups, on the other sheets, still need to run (even if they are hidden) and then check against the macro to determine whether to be hidden or unhidden.

    Sorry if this is a simple answer and thanks for your help!
    Last edited by Hot Soup; 07-29-2009 at 11:11 AM.

  2. #2
    Registered User
    Join Date
    07-27-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditionally Hide Excel Tabs-If they are Empty

    Using Roy's post here: http://www.excelforum.com/1817360-post4.html

    I tried to create the following, but I get the error "Argument not optional" It does not point to the place in the code where I go wrong, and debug shows no problems.

    Please Login or Register  to view this content.
    Any Advice?

  3. #3
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481

    Re: Conditionally Hide Excel Tabs-If they are Empty

    You don't need the Target reference.

    Try this to hide your empty worksheets instead

    Please Login or Register  to view this content.
    I'm not sure about dealing with your secone problem.

    You could run an unhide subroutine similar to the one above that will run on a worksheet change event handler that watches for a change in the range where data would be enterend on the active sheet.

  4. #4
    Registered User
    Join Date
    07-27-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Conditionally Hide Excel Tabs-If they are Empty

    Thanks, that works.

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