+ Reply to Thread
Results 1 to 3 of 3

Hide/Unhide 10 consecutive rows down

  1. #1
    Robert
    Guest

    Hide/Unhide 10 consecutive rows down

    I have gone through previous posts but could not get the correct/similar code
    for:-
    1.when command button(1) is clicked, 10 rows down (if hidden) from an
    active cell should be unhidden i.e. if B4 is active cell, rows 5 to 14
    should be unhidden
    2.when command button(2) is clicked, 10 rows down (if not hidden) from a
    active cell should be hidden i.e. if B40 is the active cell, rows 41 to 50
    should be hidden.
    Would appreciate assistance
    --
    Robert

  2. #2
    Ardus Petus
    Guest

    Re: Hide/Unhide 10 consecutive rows down

    sub CommandButton1_Click()
    activecell.offset(1,0).resize(10).Entirerow.Hidden = False
    end sub

    sub CommandButton2_Click()
    activecell.offset(1,0).resize(10).Entirerow.Hidden =True
    end sub

    HTH
    --
    AP

    "Robert" <[email protected]> a écrit dans le message de
    news:[email protected]...
    > I have gone through previous posts but could not get the correct/similar

    code
    > for:-
    > 1.when command button(1) is clicked, 10 rows down (if hidden) from an
    > active cell should be unhidden i.e. if B4 is active cell, rows 5 to 14
    > should be unhidden
    > 2.when command button(2) is clicked, 10 rows down (if not hidden) from a
    > active cell should be hidden i.e. if B40 is the active cell, rows 41 to 50
    > should be hidden.
    > Would appreciate assistance
    > --
    > Robert




  3. #3
    Robert
    Guest

    Re: Hide/Unhide 10 consecutive rows down

    Ardus Petus, Thank you very much for the codes.
    Implemented and working.
    --
    Robert




+ 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