VBA Code Question Tying Commands to Check Box and Hiding Rows

Sweetmusic1

New Member
Joined
Dec 1, 2014
Messages
6
Greetings! I have created a workbook with multiple worksheets. I have written the following VBA Code tied to the specific checkbox (true/false) to EXPAND a specific selection of rows when checked and to COLLAPSE the specific selection of rows when unchecked (in a seperate worksheet):
Sub ANCHORLINK()
ActiveWindow.SmallScroll Down:=-3
Sheets("Transition Worksheet").Select
If ROWS(13).ShowDetail = True Then
ROWS(13).ShowDetail = False
Else

If ROWS(13).ShowDetail = False Then
ROWS(13).ShowDetail = True
End If
End If
End Sub
What I need to also have it do is hide the rows if the check box is not checked. So that if the user checks the 4th checkbox in the list only the rows above and below the specific section in worksheet 2 hide so that the 4th selection rows move to the top when viewed & printed. Lastly, I would like to give the user the chance to check ALL the checkboxes needed without the checkbox taking the user to worksheet 2 until done checking the boxes. Thanks in advance for any insight into this!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,226,230
Messages
6,189,762
Members
453,568
Latest member
LaTwiglet85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top