Forum Discussion
ActiveX buttons unresponsive or having to be clicked twice to run macro
Celia_Alves I had the same problem and I solved it by changing the display setting.
on the excel status bar > Display Settings> choose : optimise for compatibility.
issue will resolved.
- JuanSaumellJan 31, 2024Copper Contributor
PratikAngaj Love U, thanks a lot.
- digibrainMar 07, 2023Copper Contributor
Excellent! This improved the behavior a lot. Still, for the ActiveX button to work on the first click, the excel workbook has to have focus already. Otherwise, the first click changes the focus to excel and the second click runs the ActiveX macro. It looks like by disabling 'best appearance' we lose just that: the worksheet appears not at its best. So, it's a bit of a trade-off.
- Francois_HAApr 12, 2024Copper Contributor
Solution of PratikAngaj works also for me, but I really don't like the degraded look of the worksheet.
Another solution I found is to modify the name of the macros in the VB editor (Alt-F11), so as to use the "MouseUp" event or "MouseDown" event, instead of the "Click" event.
For each control:
- replace the "ControlName_Click ()"
- by "ControlName_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
No more trade-off 🙂
Maybe it is also possible to add something to the Class, but I'm not sharp on this.
- VBHowlerAug 05, 2025Copper Contributor
I preferred to use the _MouseUp() event, as you then will still have the visual effect of the button depressing whilst the event is being fired.
- DanielAtlantaJul 09, 2022Copper ContributorPratik's answer worked for me. No other change made. Thank you Pratik!
- KontaraJun 16, 2022Copper ContributorThank you! I had a new workbook and found the same issue with my buttons. Your solution worked perfectly.
- Grant_Reid_TRGApr 07, 2022Copper Contributor
PratikAngaj This works perfectly for me. Thank you very much for sharing
- HarveyWatsonApr 21, 2021Copper Contributor
PratikAngaj That worked! Thank you so much.
- akmonkeyboyApr 29, 2021Copper Contributor
HarveyWatson I don't want to beat a dead horse here, but it happened to me as well. I didn't see @pratikangaj response or I would've tried that first...
Anyway, I went to design mode, right clicked on the button and selected "Command button object", then "Edit". I didn't change anything, just clicked out of that and for some reason that fixed it.
- androo2351Apr 30, 2021Brass Contributor
The problem seems to have gone away for me now. Don't know if that's because I did the delete .exd files thing or because, perhaps more likely, MS have now fixed whatever it is they did to cause this in the first place.