Excel VBA Macro - "Start Macro Button (F5)" stays gray after excecution

Cros4r

New Member
Joined
Jul 11, 2014
Messages
2
Hi guys!

Introduction:
First of all thank you for your high activity on this Forum - I've already found numerous solutions to problems I encountered during coding of my macros. However today the search function of the Forum+Google didn't provide me with a solution.

Problem:
I have an Excel Macro which gets a userinput through _MouseDown events. After the macro has reached the end of the main Sub, it apparantly finishes the code, but the "run macro (F5)" button stays gray and I cant click it. Also I can't click on the dropdown menues "File, Edit, View", but reach them via shortcut (pressing alt + keyboard).
The button "run macro (F5)" doesnt work, but if I hit F5, the macro runs again from the start. Pressing the "Stop button" resets everything as normal.

Funny: If I set a break point at the last line End Sub and resume after breaking, everything is fine ("Run Macro Button" ist green). The same happens, if I insert an
Code:
End
Statement right before End Sub. This behaviour is really strange and I don't understand it.


Misc:
Restarting Excel/VBA/PC didn't help.

Does anyone have any idea on this? So far it's not really a problem, since I simply put End at the end of my code, but I don't really like working around the problem.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top