Link to home
Start Free TrialLog in
Avatar of cgavant1
cgavant1Flag for United States of America

asked on

Command buttons stopped working

My command buttons stopped working in excel? I know this use to be a problem. Has it been cleared up?
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Can you attach a sample workbook?
If you quit Excel and then reopen your workbook, do the command buttons now work? If so, you may have inadvertently disabled events to cause the problem.

If your code includes a statement in your code like Application.EnableEvents = False, the command buttons will become disabled. A statement like this is frequently added to code to stop other event subs from running (like Worksheet_Change) while the macro is doing something. If the macro finishes its job normally, it will execute a statement re-enabling command buttons like Application.EnableEvents = True. The problem arises if a run time error causes the macro to stop executing before it re-enables events.

To re-enable events, in the Immediate WIndow in the VBA Editor, type the following statement and hit Enter:
Application.EnableEvents = True
Avatar of cgavant1


Here goes...
"Application.EnableEvents = True " Did not help.

I am going to see if it is my new docking station. I read elsewhere that does the trick.
Avatar of cgavant1
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial