May 2021 1 62 Report
Macro Issue on Excel!??!?

Okay so we're going to ignore the grouping on the far left and focus on the + and - (expand and collapse) inside Blue and Red Success Pens

So basically the expand and collapse are a button assigned by macro. This is meant to be for record keeping. So the macro works but when I insert rows, everything under doesn't work as it won't. So this is what I wrote on macro for the buttons to work. The idea was to have something inside the category since I was told that many people ignore what's on the far left.

Sub Picture15_Click()

Rows(2).ShowDetail = True

End Sub

Sub Picture12_Click()

Rows(2).ShowDetail = False

End Sub

Sub Picture22_Click()

Rows(29).ShowDetail = True

End Sub

Sub Picture21_Click()

Rows(29).ShowDetail = False

End Sub

So it works when nothing is inserted but as soon as these tables get full, people will start inserting rows. I want to know if I can change something in macro to where I can keep the button functional when new rows are inserted.

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2025 Q2A.ES - All rights reserved.