My command buttons stopped working in excel? I know this use to be a problem. Has it been cleared up?
Microsoft Excel* VBA command buttons stopped workingMicrosoft Office
Last Comment
cgavant1
8/22/2022 - Mon
Martin Liss
Can you attach a sample workbook?
byundt
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
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.