How do I copy a macro from one workbook to another on a MAC?

Anonymous
2014-05-10T02:21:41+00:00

How do I copy a macro from one workbook to another workbook on a MAC?  I do not want to store the macro in the personal macro workbook or a separate sheet.  It will be used on different computers by different people at various times.  The computers will not share a network of anything else in common and will be located at different sites.  Your help will be greatly appreciated.

Thank you.

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. Jim G 133.9K Reputation points MVP Volunteer Moderator
    2014-05-10T13:18:00+00:00

    There is a better way than the method suggested by Arshad.

    If you want to move VBA code to a different workbook, you cannot move it directly like a worksheet. Instead, you can export the code modules and userforms from the original workbook as files, and then import the code into the other workbook.

    To move VBA code to a different Microsoft Excel for Mac workbook, follow these steps:

    1. Open the workbook that contains the macro module that you want to move (source workbook).
    2. Open the workbook to which you want to move the code (destination workbook), or open a new workbook (destination workbook).
    3. In the VB Editor of the source workbook, in the Project window, select the module or userform you wish to move.
    4. In the VB Editor of the source workbook, from the File menu choose **Export File...**and then name and save the .bas file.
    5. Switch to the destination workbook.
    6. In the VB Editor of the destination workbook, on the File menu, choose Import File... and the open the saved .bas file you exported from the source workbook.
    7. Your module or userform will now be in the destination workbook.
    10 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-05-10T11:16:43+00:00
    0 comments No comments
  2. Anonymous
    2014-05-11T00:28:35+00:00

    I would like to thank all of you who replied to my inquiry.  It worked just fine.

    2 people found this answer helpful.
    0 comments No comments