cgavant1
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?
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
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
ASKER
Here goes...
CommandButtonWoes.xlsm
CommandButtonWoes.xlsm
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.
I am going to see if it is my new docking station. I read elsewhere that does the trick.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.