ActiveX button not triggering the VBA code.

Anonymous
2019-05-15T05:10:55+00:00

Split from this thread.

Hello,

I'm experiencing a similar issue.  Past excel (.xlsm) worksheets that have worked i.e. no changes to code, are no longer working.  When I attempt to the run the code directly from the VBA Code window, the code works.  It appears to be an issue with the ActiveX button not triggering the VBA code.  When I click on a button a smaller version of the button appears, but no other functions occur

Windows 10 Version 1803 (OS Build 17134.706)

Office Excel Version 1904 (Build 11601.20204 Click-to-Run)

While in Design Mode, right-clicking a button > CommandButton Object > Edit, the small button appears again and is the button that can be edited:

The little button is not there (i.e. clickable) at any other times.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2019-05-18T09:20:30+00:00

    I think I've found the thing that's causing the problem for me. It's a setting. In Display Settings, all three monitors are set to use the same Resolution ( 1920x1080). The 'Change the size of text, apps and other items' setting was at 125% for two of the monitors. For the third, the setting was 150%. When I moved the .xls between the screens, it was the third monitor where the problem presented. I changed the setting to 125% for the third monitor and now the buttons are working on that screen, as well as the other two i.e. it works consistently across all monitors. 

    Thanks again for everyone's attention and support. Nice to get it resolved !

    Steve

    7 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2019-05-18T00:06:41+00:00

    Hello Alex,

    I discovered and resolved the issue!

    I'm running a Surface Pro 4 connected to a Microsoft Dock that is connected to two monitors at 1680X1050 resolution.  Running the Excel files within the Surface Pro 4 window worked, but when I dragged the Excel window to the other monitors it seems like Excel was keeping the button focus in the locations of the buttons under the Surface Pro 4 resolution of 2736X1824 even through the visually the button display was relocated to the monitor resolution (hence the appearance of an extra button when the button was clicked, but no actions occurring?). 

    Resolution:

    I disconnected the monitors through Display Settings, restarted the Surface, reconnected the monitors through Display Settings and the files started to work on all screens/monitors.  Thanks for your time and energy in trying to help me resolve this issue.  This has to be a new one for the KB :)

    Sincerely,

    Darren Gock

    2 people found this answer helpful.
    0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-05-15T05:20:57+00:00

    Hi Darren,

    Thanks for the images. That makes the question very clear. I cannot reproduce the same behavior in the latest version of Excel:

    When I click on the button, it just run the code.

    When I right click in the Design Mode > Command Button Object > Edit. No other buttons shows up.

    My version of Excel:

    May I know your Excel version? Have you tried it on a new file?

    Regards,

    Alex

    0 comments No comments
  2. Anonymous
    2019-05-15T18:51:58+00:00

    Hello Alex,

    A new file produces the same error:

    My version of Excel is below:

    Thanks for you help with this.

    Sincerely,

    Darren

    0 comments No comments
  3. Anonymous
    2019-05-16T05:51:20+00:00

    Hi Darren, 

    Thanks for the information.

    I just updated to the same version as yours, and the command buttons works fine. Can you share a copy of your file with us and I'll test it from my side. I sent you the file I use: Private Message.

    Also, please check the Windows version and build too. If there are any updates, you can install them first.

    Regards,

    Alex

    0 comments No comments