+ Reply to Thread
Results 1 to 3 of 3

Toggle Code

  1. #1
    Registered User
    Join Date
    12-10-2004
    Posts
    7

    Toggle Code

    Sub ToggleHidingColA()
    ' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
    Rows ("10:32").Hidden = Not (Rows("10:32").Hidden)
    End Sub

    The above code allows a macro button to toggle Hide/Unhide of Rows 10 to 32 incl.

    If Rows 10 to 32 are indentified with a Named Range of 'Level01', how is the above code ammended to show the Named Range not the row numbers???

    This must be simple, but I'm missing it somewhere!!!!

  2. #2
    Tom Ogilvy
    Guest

    Re: Toggle Code

    Sub ToggleHidingColA()
    ' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
    Range("Level01").EntireRow.Hidden = _
    Not (Range("Level01").EntireRow.Hidden)
    End Sub

    --
    Regards,
    Tom Ogilvy

    "thunderfoot" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Sub ToggleHidingColA()
    > ' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
    > Rows ("10:32").Hidden = Not (Rows("10:32").Hidden)
    > End Sub
    >
    > The above code allows a macro button to toggle Hide/Unhide of Rows 10
    > to 32 incl.
    >
    > If Rows 10 to 32 are indentified with a Named Range of 'Level01', how
    > is the above code ammended to show the Named Range not the row
    > numbers???
    >
    > This must be simple, but I'm missing it somewhere!!!!
    >
    >
    > --
    > thunderfoot
    > ------------------------------------------------------------------------
    > thunderfoot's Profile:

    http://www.excelforum.com/member.php...o&userid=17341
    > View this thread: http://www.excelforum.com/showthread...hreadid=470808
    >




  3. #3
    Bob L.
    Guest

    Re: Toggle Code

    Won't this work?

    Range("level01").Rows.Hidden = Not (Range("level01").Rows.Hidden)

    Bob L.






    "thunderfoot" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Sub ToggleHidingColA()
    > ' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
    > Rows ("10:32").Hidden = Not (Rows("10:32").Hidden)
    > End Sub
    >
    > The above code allows a macro button to toggle Hide/Unhide of Rows 10
    > to 32 incl.
    >
    > If Rows 10 to 32 are indentified with a Named Range of 'Level01', how
    > is the above code ammended to show the Named Range not the row
    > numbers???
    >
    > This must be simple, but I'm missing it somewhere!!!!
    >
    >
    > --
    > thunderfoot
    > ------------------------------------------------------------------------
    > thunderfoot's Profile:
    > http://www.excelforum.com/member.php...o&userid=17341
    > View this thread: http://www.excelforum.com/showthread...hreadid=470808
    >




+ 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