Avatar of cgavant1
cgavant1
Flag 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?
Microsoft Excel* VBA command buttons stopped workingMicrosoft Office

Avatar of undefined
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
cgavant1

ASKER
Here goes...
CommandButtonWoes.xlsm
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
cgavant1

ASKER
"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.
ASKER CERTIFIED SOLUTION
cgavant1

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
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.
ask a question