Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default record macro "That name is not valid."

I'm trying to learn how to use macros and start out by trying to record one.

I went:
Tools
Macro
Record New Macro....

For "Macro name:" I left "Macro1"

click "OK" and get an error message...."That name is not valid."

I've tried everything....starting with a letter, no spaces, opening a new
workbook...keep getting the same error message

--
highlifesipper
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: record macro "That name is not valid."

Hi highlifesipper,

I'm sorry to hear that you're having trouble recording a macro in Excel. Let's see if we can figure out what's going on.

First, let's make sure that you're following the correct steps to record a macro:
  1. Click on the "Developer" tab in the ribbon. If you don't see the Developer tab, you may need to enable it in Excel's options.
  2. Click on the "Record Macro" button in the "Code" group.
  3. In the "Record Macro" dialog box, enter a name for your macro in the "Macro name" field. Make sure the name starts with a letter and doesn't contain any spaces or special characters.
  4. Choose where you want to store the macro. You can store it in the current workbook or in your Personal Macro Workbook, which is a hidden workbook that stores macros that you can use in any workbook.
  5. Click "OK" to start recording the macro.

If you're still getting the "That name is not valid" error message, there are a few things you can try:

1. Make sure that the name you're entering for the macro doesn't already exist in the workbook or in your Personal Macro Workbook.

2. Try using a different name for the macro. Make sure the name starts with a letter and doesn't contain any spaces or special characters.

3. If you're still having trouble, try restarting Excel and recording the macro again.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 419
Default record macro "That name is not valid."

highlifesipper,

Macro names can not contain spaces.

There are some other restrictions, but I don't remeber them off the top of
my head.

HTH,

Conan


"highlifesipper" wrote in message
...
I'm trying to learn how to use macros and start out by trying to record
one.

I went:
Tools
Macro
Record New Macro....

For "Macro name:" I left "Macro1"

click "OK" and get an error message...."That name is not valid."

I've tried everything....starting with a letter, no spaces, opening a new
workbook...keep getting the same error message

--
highlifesipper



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default record macro "That name is not valid."

Macro1 is a valid name. I've used it many times when I'm not going to keep
the macro. Try a name like ABCDEF and see what happens.

Tyro

"highlifesipper" wrote in message
...
I'm trying to learn how to use macros and start out by trying to record
one.

I went:
Tools
Macro
Record New Macro....

For "Macro name:" I left "Macro1"

click "OK" and get an error message...."That name is not valid."

I've tried everything....starting with a letter, no spaces, opening a new
workbook...keep getting the same error message

--
highlifesipper



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default record macro "That name is not valid."

Basically, without looking up a reference with a specific list, you can't
have spaces in a macro name, and the name must start with a letter of the
alphabet. There are probably some special characters that can't be used, but
I don't know what they are at the moment, because I always stick to a few
'rules' when I create a Sub or Function name:
begin the name with a letter of the alphabet
only use letters from the alphabet, numbers and the underscore ( _ )
character within the name.
Keep it reasonably short.

Examples of names I might use:
MyFirstMacro
My_First_Macro
sort_ByNumber
sort_ByName
sort_BySSAN

Conan is correct, "Macro1" should be a valid name as long as it doesn't have
any spaces in it anywhere. And it is odd that Excel is telling
highlifesipper that the name is invalid, when it created the name itself!
(one good reason for never naming a macro by starting the name with the word
Macro followed by a number).

If highlifesipper had tried manually entering the name "Macro1" and
continuing, I could perhaps understand why he's getting an error (Excel may
have previously used that name and so wouldn't like someone trying to use it
again). But I don't understand why Excel is assigning that name and then
refusing to validate it.

"Conan Kelly" wrote:

highlifesipper,

Macro names can not contain spaces.

There are some other restrictions, but I don't remeber them off the top of
my head.

HTH,

Conan


"highlifesipper" wrote in message
...
I'm trying to learn how to use macros and start out by trying to record
one.

I went:
Tools
Macro
Record New Macro....

For "Macro name:" I left "Macro1"

click "OK" and get an error message...."That name is not valid."

I've tried everything....starting with a letter, no spaces, opening a new
workbook...keep getting the same error message

--
highlifesipper






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default record macro "That name is not valid."

Just a guess--and I got a different error when I tested this.

Do you have a module named Macro1?
Did you rename the project to Macro1?

Did you use that name somewhere else?

highlifesipper wrote:

I'm trying to learn how to use macros and start out by trying to record one.

I went:
Tools
Macro
Record New Macro....

For "Macro name:" I left "Macro1"

click "OK" and get an error message...."That name is not valid."

I've tried everything....starting with a letter, no spaces, opening a new
workbook...keep getting the same error message

--
highlifesipper


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Reference not valid" error when I try to edit the macro in excel Yuvaraj Excel Discussion (Misc queries) 1 January 10th 08 08:32 PM
Why won't the "record macro" button show on worksheet checkQ Excel Discussion (Misc queries) 2 April 5th 07 01:26 AM
Macro Error "Unable to record" Gary Excel Worksheet Functions 0 December 5th 06 05:24 PM
Why can't I record "flag for follow up" as a Macro? Richard Hocking Excel Discussion (Misc queries) 7 September 14th 06 11:47 AM
"Turn "record macro" display on. greaseman Excel Discussion (Misc queries) 2 April 28th 06 05:58 PM


All times are GMT +1. The time now is 12:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"