Excel 2003 macro names

  • Thread starter Thread starter Ron Dahl
  • Start date Start date
R

Ron Dahl

I am using Office 2003 on Windows XP.

If I create three identical macros and call them "a1", "aa1", and "aaa1",
only the last one called "aaa1" will work. I cannot go to
Tools->Macros->Run and run the first two macros.
I can step through them at design time, however.

Are there new name restrictions in Office 2003?

The macros I used are posted below.

Sub a1()
Cells(5, 5).Select
End Sub

Sub aa1()
Cells(5, 5).Select
End Sub

Sub aaa1()
Cells(5, 5).Select
End Sub
 
I think you're probably right. I really though I had done it before, but I
tried it on a computer with Excel 2002 and it didn't work either.
Thanks for the quick response.
Ron Dahl
 
Ron said:
I am using Office 2003 on Windows XP.

If I create three identical macros and call them "a1", "aa1", and "aaa1",
only the last one called "aaa1" will work. I cannot go to
Tools->Macros->Run and run the first two macros.
I can step through them at design time, however.

Are there new name restrictions in Office 2003?

The macros I used are posted below.

Sub a1()
Cells(5, 5).Select
End Sub

Sub aa1()
Cells(5, 5).Select
End Sub

Sub aaa1()
Cells(5, 5).Select
End Sub

I'm not sure if you could do it in previous versions of excel, but I
think not, because "a1" and "aa1" might be interpreted as cells so it
gets confusing.

Regards,
 
Ron

Excel thinks a1 and aa1 are cell references and won't allow them to Run or be
edited from Tools>Macro>Macros.

Rename them if you want to run them from the Tools>Macro>Macros.

Gord Dibben Excel MVP
 
Back
Top