Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

Fixing a Macro Button

EE Pros,

I have a WS that has a Macro Button for expanding and collapsing a outline form.  In building out several new capabilities, this Macro Button got replicated and from within the code itself, produces additional buttons (on top of each other).  It comes from defining two range names (why?  I don't know) but for some reason it's these range names and their location in the code that is now affecting the ability to have the WS behave correctly.

Code attached,

B.
D--Data-Data-Temp-Copy-of-28820120b.xlsm
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

There's currently no code associated with that button. Is it supposed to be associated with Sheet1.button_Click or Sheet1.Expand_Summary?
When I associate it with Sheet1.Expand_Summary and collapse the use cases down to just their header rows, clicking it expands the use cases. I don't see any problem.
Avatar of Bright01

ASKER

Martin,

You are correct. However, the reason there is no code behind the gray button, is because you are looking at a copy of the button.  If you delete several of them, you will then see a Button 9, Button 8, Button 7.....delete them all until you get down to the original button which does have code behind it.  Now fire the Blue Button and you will see an error.

B.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I should have caught that!   ;-)

Thank you!

B.
Martin,

I've issued a new question to fix the math in the selected boxes.  Right now if you remove all check marks, the value in the sum cell (bottom of the table) still has a value.  It should read -0-.

Here is the new post.  Hope you will take a look.

https://www.experts-exchange.com/questions/28826919/A-Fix-to-the-Check-Boxes-and-Math.html

Best regards,

B.
Oh.... the attached file is slightly updated (no coding changes) ...... I simply changed the button but no code changes except to make the txt in an unselected box darker.  Nice touch!  Thanks for the tip.

B.