Excell for Mac Microsoft Visual Basic Invalid procedure call or argument

Anonymous
2024-03-19T10:11:35+00:00

Hello friends! I have an issue while opening the macro Excel sheet on my Mac.

During an attempt to open an Excel doc, an

"Invalid procedure call or argument" error message pops up. By pressing OK button this message appears again and again.

I have to use force quite otherwise there is no other way how to escape from this error and close the program. A macro document has been created on Windows. I would appreciate it if you could advise me on how to solve this issue. Thank you beforehand.

Microsoft 365 and Office | Excel | Other | MacOS

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
    2024-03-23T18:50:20+00:00

    Hello.

    Many thanks for your detailed advice.

    Unfortunately, I have been swamped the last few days and did not check the code and everything because it is not urgent for me now.

    Anyway, thanks for your concern.

    1 person found this answer helpful.
    0 comments No comments

9 additional answers

Sort by: Most helpful
  1. Rory Archibald 18,875 Reputation points Volunteer Moderator
    2024-03-19T11:09:50+00:00

    I think you'll need to disable macros, then review any code that is triggered in or by either a Workbook_Open or Auto_Open routine. The message would suggest that there is probably error handling in place that prevents debugging the code.

    0 comments No comments
  2. Anonymous
    2024-03-20T06:48:02+00:00

    Dear Rory, many thanks for your reply. But, unfortunately, I do not have any clue how to fix this document. I was wondering if you could attached some photos with steps was advised by you.

    0 comments No comments
  3. Jim G 134K Reputation points MVP Volunteer Moderator
    2024-03-20T23:07:37+00:00

    Fixing your own coding mistakes is challenging enough. Troubleshooting someone else's code adds a layer of complexity.

    Use the Menu Bar and choose Tools > Macro > Visual Basic Editor to get into the editor. In the upper left panel you'll see projects listed. Click the + sign next to the name of the workbook that has the problem. Then look for a folder called Modules. Inside that folder you should find the visual basic code modules. You'll have to read the code and try to make sense of it.

    There are lots of help topics on the web to help you learn the VB Editor and how to code. Here's one: https://learn.microsoft.com/en-us/office/vba/library-reference/concepts/getting-started-with-vba-in-office

    0 comments No comments
  4. Anonymous
    2024-03-21T07:42:44+00:00

    Hello, Jim.

    Thank you very much for your kind reply. The thing is, code isn’t mine and I just need to work with this document.

    Have a great day!

    0 comments No comments