Share via

Macro not running when selected

Anonymous
2021-11-17T20:40:12+00:00

Hello,

After being out on vacation and returning. I tried to use one of my Excel files and the Macro that I have on one of the pages as a button is no longer working and is giving me the following error. Any help would be appreciated.

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

11 answers

Sort by: Most helpful
  1. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2021-11-19T17:19:58+00:00

    Show us the file.

    If the file contains confidential data: Make a copy of the file, open the copy and delete the confidential data.

    IMPORTANT: Zip your file!
    https://support.microsoft.com/en-us/windows/zip-and-unzip-files-8d28fa72-f2f9-712f-67df-f80cf89fd4e5

    Login to https://onedrive.live.com (Use the same Login ID and password as for this forum).
    Click Upload in the top and choose your file.
    After uploading, right click the file and choose Share.
    Click Copy Link in the lower left edge (no need to enter an email).
    Copy the link and paste it here.

    Andreas.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-11-19T13:08:44+00:00

    Ossie,

    The workbook with the button and the one containing the macro is one in the same. I was able to open up Visual Basics for Applications - Proposal Template - BLANK.xlsm and run the macro from within it. But I'm still unable to run the Macro directly from the workbook.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-11-19T13:07:14+00:00

    The file I have open is in fact "Proposal Template - BLANK.xlsm" how do I do as you suggested and redirect the button to the local macro?

    I was able to open up Visual Basics for Applications - Proposal Template - BLANK.xlsm and run the macro from within it.

    Was this answer helpful?

    0 comments No comments
  4. OssieMac 48,001 Reputation points Volunteer Moderator
    2021-11-19T01:54:55+00:00

    It is possible that during your absence someone moved the workbook containing the macro to another folder or renamed the called macro. You could check if both workbooks are in the same folder and check the sub name.

    Alternatively:

    • Open both workbooks (The workbook with the button to call the macro and the workbook containing the called macro)
    • Select the workbook containing the button to call the macro.
    • Right click the button that calls the macro
    • Select Assign macro
    • In the dialog, select the required macro to be called and click OK.
    • Save the workbook containing the macro and close it.
    • Save the workbook with the button.
    • Click the button and test.

    Was this answer helpful?

    0 comments No comments
  5. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2021-11-18T14:35:23+00:00

    That means the macro named "Final" is inside the file named "Proposal Template - BLANK.xlsm" and Excel can not open that file to execute it.

    If you have the macro in your actual file too, redirect the button to your local macro.

    Andreas.

    Was this answer helpful?

    0 comments No comments