+ Reply to Thread
Results 1 to 3 of 3

Reveal/Hide Lines on Multiple Page at the same time

  1. #1
    Forum Contributor
    Join Date
    08-28-2015
    Location
    Montreal, Canada
    MS-Off Ver
    2013 on PC, 2011 on MAC
    Posts
    159

    Reveal/Hide Lines on Multiple Page at the same time

    Hey everyone !

    I'm fairly a newbie when it comes to write VBA code from scratch, so I tried to modify a procedure I had but can't seem to make it work.

    Basically, I have a few headers on different page (6 totals) that I would like to reveal/hide by pressing only one button. The procedure I had was working fine to reveal the header on the active page, but I would have to go through all the pages individually, then click on the button from each page, if I wanted to reveal/hide them all. So I tried to combine them all in one single procedure, but it stops right after the first one (the first one works fine). Here's what I have:

    Please Login or Register  to view this content.
    So basically, it should reveal/hide rows 12:19 on Sheet7 through Sheet12. I can make it work individually, but can't seem to be able to combine them all under the same procedure.
    I'm sure it's a simple tweak, but the VBA newbie in me could use your help.

    Thanks to anyone willing to help !

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Reveal/Hide Lines on Multiple Page at the same time

    For this simple macro, you should use the NAMES of the sheets as displayed to the user. I have them as "Sheet1", "Sheet2", etc.

    We first check the hidden status of one row on one sheet, then toggle all rows on all sheets to the opposite state. This should keep them in sync.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    08-28-2015
    Location
    Montreal, Canada
    MS-Off Ver
    2013 on PC, 2011 on MAC
    Posts
    159

    Re: Reveal/Hide Lines on Multiple Page at the same time

    Worked like a charm !
    God I love this place.

    Thanks for the help, consider yourself rep'd.

+ 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] Help with VBA to hide/reveal rows subject to dop down selection
    By Maleficent in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2019, 10:49 AM
  2. Grouped rows, hide/reveal base on cell value
    By JonesyCC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2016, 09:14 PM
  3. Drop down menus that hide or reveal cells
    By markugo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 03:57 PM
  4. Reveal rows one at a time only?
    By Margate in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2013, 02:08 PM
  5. Replies: 0
    Last Post: 06-13-2012, 08:09 AM
  6. Using a listbox to hide/reveal rows.
    By graveyardshiftee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2012, 12:09 AM
  7. Hide/Reveal
    By magneticgravity in forum Excel General
    Replies: 2
    Last Post: 04-09-2008, 06:34 AM

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