The syntax of this name isn't correct when trying to record a macro.

Anonymous
2019-10-21T16:12:36+00:00

I am trying to create an Excel macro using the Macro Recorder. No matter what name I give the macro (Macro1, Macro2, Harvey) I receive the following dialog error message: The syntax of the name isn't correct.

The names do not violate any of the 3 conditions given (start with letter or _, doesn't contain space or unallowed character, doesn't conflict with another name).

This error comes up even on a brand new workbook.

I have not been able to find any way to fix it. Any suggestions? Thank you.

I have let excel choose the name for me.  I have rebooted.  same error.

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

8 answers

Sort by: Most helpful
  1. Anonymous
    2019-10-21T18:59:11+00:00

    Hi JSPJ67,

    Do you mean the issue persists even you click Developer -> Record Macro (Use the Excel assigned name) -> Ok?

    I would like to give you some suggestions as below:

    1. Try to switch "the Store macro in: " option to another place.

    1. Try to Open Excel in safe mode to see the result.

    Method1. Press and hold the CTRL key to open Excel.

    Step1. Find the shortcut icon for Excel.

    Step2. Press and hold the CTRL key and double-click the Excel shortcut.

    Step3. Click Yes when a window appears asking if you want to start Excel in Safe Mode.

    Method2. Use the /safe option to open Excel.

    Step1. Right-click the Start button (lower-left corner) in Windows, click Run.

    *Alternatively, you can press the Windows + R key on your keyboard.

    Step2. In the Run box, type excel /safe, and click OK.

    *Note: To stop Excel Safe Mode, exit and restart Excel. It will start in normal mode unless there's a problem opening Excel.

    Besides, have you updated Excel to the latest version? It’s always recommended to keep your Office updated to the latest version. The latest version of Office includes the latest Feature and Security updates.

    If the issue persists, could you provide a screenshot of the error message? I’m willing to help you further.

    Best Regards,

    Hugo

    0 comments No comments
  2. Anonymous
    2019-10-22T13:16:44+00:00

    here is a screenshot of error.

    when i open in safe mode the problem isn't there?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-10-22T18:24:29+00:00

    Hi JSPJ67,

    Thanks for your reply.

    Do you mean the issue disappear in Excel safe mode or the issue persists in Excel safe mode?

    Normally, if the issue doesn’t happen in Office client safe mode but occurs in the normal start, this means there have incompatible third-party add-ins in Office clients. Please click Insert -> click the down triangle behind My Add-ins, you can find the Recently Used Add-ins lists here.

    Click See All..., then you may find some add-ins below the MY ADD-INS tab on the Office Add-ins panel. Hover on the add-ins -> click on the ellipsis -> click Remove to remove all of them one by one. Re-open Excel and check whether the issue disappears.

    *You can make a note of the installed add-ins and try to re-install them one by one to check which add-in will cause this issue.

    If the issue persists in Excel safe mode, I would like to give you another two suggestions:

    1. Run as administrator to open Excel.Click Start menu, Right-click on Excel icon -> More -> Run as administrator.
    2. Perform Online Repair Office to see the result.

    Have a try and tell me the results.

    Best Regards,

    Hugo

    0 comments No comments
  4. Anonymous
    2019-10-23T13:45:00+00:00

    I do not have the error in safe mode.

    Here is a list of my add-ins I need to delete them all?

    when I hover over them no ellipses comes up so how do I delete? 

    0 comments No comments
  5. Anonymous
    2019-10-23T13:52:27+00:00

    Sorry if this insults your intelligence - but check there isn't an invisible space after Macro11.  I've come across this a number of times with clients.

    2 people found this answer helpful.
    0 comments No comments