+ Reply to Thread
Results 1 to 3 of 3

hide/unhide macro

  1. #1
    Registered User
    Join Date
    11-09-2005
    Posts
    10

    hide/unhide macro

    Can someone help me design a hide/unhide macro that I can attach to a button? I'm looking to create a macro that will allow me to hide the contents of two specific cells (or rows if need be) at the click of a button...and then unhide them again at the click of the same button. So far, I've been successful at hiding these two rows at the click of a button but not unhide them. Here's what I had so far:

    ActiveWindow.SmallScroll Down:=50
    Range("C66:M67,C75:M76").Select
    Range("C75").Activate
    Selection.EntireRow.Hidden = True
    End Sub

    Thank you

  2. #2
    Bob Phillips
    Guest

    Re: hide/unhide macro

    Sub HideUnhide
    Rows("10:11").Hidden = Not Rows("10:11").Hidden
    End Sub

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "zenahs" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Can someone help me design a hide/unhide macro that I can attach to a
    > button? I'm looking to create a macro that will allow me to hide the
    > contents of two specific cells (or rows if need be) at the click of a
    > button...and then unhide them again at the click of the same button.
    > So far, I've been successful at hiding these two rows at the click of a
    > button but not unhide them. Here's what I had so far:
    >
    > ActiveWindow.SmallScroll Down:=50
    > Range("C66:M67,C75:M76").Select
    > Range("C75").Activate
    > Selection.EntireRow.Hidden = True
    > End Sub
    >
    > Thank you
    >
    >
    > --
    > zenahs
    > ------------------------------------------------------------------------
    > zenahs's Profile:

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




  3. #3
    PCLIVE
    Guest

    Re: hide/unhide macro

    Sub HideUnhideRow()
    If Range("A1").EntireRow.Hidden = True Then Range("A1").EntireRow.Hidden =
    False Else: Range("A1").EntireRow.Hidden = True
    End Sub

    "zenahs" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Can someone help me design a hide/unhide macro that I can attach to a
    > button? I'm looking to create a macro that will allow me to hide the
    > contents of two specific cells (or rows if need be) at the click of a
    > button...and then unhide them again at the click of the same button.
    > So far, I've been successful at hiding these two rows at the click of a
    > button but not unhide them. Here's what I had so far:
    >
    > ActiveWindow.SmallScroll Down:=50
    > Range("C66:M67,C75:M76").Select
    > Range("C75").Activate
    > Selection.EntireRow.Hidden = True
    > End Sub
    >
    > Thank you
    >
    >
    > --
    > zenahs
    > ------------------------------------------------------------------------
    > zenahs's Profile:
    > http://www.excelforum.com/member.php...o&userid=28681
    > View this thread: http://www.excelforum.com/showthread...hreadid=484013
    >




+ 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