Forum Discussion
ActiveX buttons unresponsive or having to be clicked twice to run macro
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.
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.