+ Reply to Thread
Results 1 to 2 of 2

to use VBA to expand and collapse entire rows

  1. #1
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    190

    to use VBA to expand and collapse entire rows

    Hi

    I need some a couple of vba help with the attached workbook. Help will be greatly appreciated.

    Fort the first part
    1. Cell B8 is double clicked, entire rows from 9 to 13 is to be collapsed. If double clicked again it should be able to expand.
    2. Cell B14 is double clicked, entire rows from 15 to 20 is to be collapsed. If double clicked again it should be able to expand.
    3. Cell B21 is double clicked, entire rows from 22 to 27 is to be collapsed. If double clicked again it should be able to expand.

    The second part can I check is it possible for the rows in between to auto sort by status in column m. The function should keep open items at the top followed by completed items below within the group. I have tried this before and it didnít quite work out and am not sure if itís because of the collapsible/expandable hidden function. If part2 is not possible itís ok.
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4,890

    Re: to use VBA to expand and collapse entire rows

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Double click in the cell.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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