The syntax of this name isn't correct. Macros Excel

Anonymous
2021-09-17T13:52:23+00:00

I've been using Excel and creating Macros for one of the reports, and for some reason after using it for a couple of days, when I saved and close the workbook it deleted the Macros saved in that workbook by itself. I didn't know why that happened, so I had to record the Macros all over again and create the new workbook completely separate, and after using it for some time it deleted all the Macros again. But this time before it happened I save the codes in Notepad. However, now when I try to record the Macros again, it gives me a message that says "The syntax of this name isn't correct" even though that I use recommended name, different name, this workbook, new workbook, etc. I also try to close it and reopen it, I did restart my PC, I did run Online Repair of Microsoft Office Tool and nothing helped. Please advise. Thanks

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
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2021-09-18T08:04:33+00:00

    Hi

    Thank you for your question in this community, I am willing to help you solve your problem, according to your description of the problem:

    To help us better determine whether the problem is Macros or Excel, I suggest you try to test a simple Macros to see if the problem still exists or not。

    Please tell us your test results, and you have already run Online repair, is your current Excel version the latest version? if not, please update to the latest version and try.

    Install Office updates

    Best Regards

    Ethan

    0 comments No comments
  2. Anonymous
    2021-09-20T12:54:22+00:00

    Hello,

    Thank you for helping me. I did run the Update and I also uninstalled and installed the Office back. So now, it does let me use Macros in the new workbooks but it doesn't let me use it in the workbook that gives me a problem. Even though when I tried and copy the data from the broken workbook to the new one and try to use Macros, it still doesn't let me. I also tried and copied just values, not Macros, and still doesn't let me. It gives me the same error message. Thank you

    Marijela Zegarac

    0 comments No comments
  3. Anonymous
    2021-09-22T10:31:29+00:00

    Hi

    Thank you for your update and reply. After I checked your reply, you can try to pass:

    Paste Special to copy your values, through the upper left corner of Excel

    And, you can try to save your file as a new file and try again

    If none of the above methods help you solve the problem, you can send me your file and let me help you test!

    PM

    Best Regards

    Ethan

    0 comments No comments
  4. Anonymous
    2021-09-24T09:58:22+00:00

    Hi Marijela Zegarac,

    I'm writing this reply to follow up on this thread, may I know I you have checked my last reply? And if you still need help here, please feel free to come back and let us know.

    Stay safe and have a nice day : )

    Best Regards,

    Ethan

    0 comments No comments
  5. Anonymous
    2021-09-24T15:09:58+00:00

    Hi,

    I tried that as well and in that case when I copy the data, and even just values, it gives me the same errors on the new worksheet. However, something strange happen today. So because my Excel wasn't working (Macros and Subtotals), I had to change my device in the meantime so I could send these reports. Yet, today, when I decided to send you the file, I said let me try it one more time, after hundred times trying to troubleshoot it....and now is working! I also plug in back my old device, and try it there as well, and is working. I have no comments. In the case, if it decides to go "crazy" again, I'll let you know guys. Thank you so much for reaching out!

    Sincerely,

    Marijela Zegarac

    0 comments No comments