Share via

Cannot execute the VBA code after click on the button

Anonymous
2023-11-02T07:40:26+00:00

Hello everyone,

I have one macro excel file, and the current VBA codes are running well.

I want to add a new VBA code inside this excel file then assign this code to the new button but the new VBA code could not be executed after clicking on the button. It always pop up the error as below picture. However, when I test run the new VBA code on "Macro" function, it's still running well! Do you know how to handle this issue? or because of I just updated my Office 365 from 32 bit to 64 bit and there are any conflict?

Microsoft 365 and Office | Excel | For business | 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

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-11-02T08:17:34+00:00

    It's possible that the issue is related to the update from 32-bit to 64-bit, but it's difficult to say for sure without more information. Could you share us a test file to reproduce your issue?

    For sharing a sample workbook, upload to OneDrive or any other cloud drives. Then post a link here.

    You may try running the code in a new workbook: Create a new workbook and copy the VBA code and button over to the new workbook. See if the code runs properly in the new workbook.

    1 person found this answer helpful.
    0 comments No comments