LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Macro Names

Looking at VBA Help for the Sub statement, the "name" argument "follows
standard variable naming conventions".

Looking at VBA Help for variable definition:

Variable names must begin with an alphabetic character, must be unique
within the same scope, can't be longer than 255 characters, and can't
contain an embedded period or type-declaration character.

Type declaration characters include $ (string), # (double), % (Integer),
& (long).

Brackets delimit argument lists, so are not valid within names.

Since spaces delimit VBA tokens, a name can't contain a space character,
either.

This will work:

Chart_1A_MS


In article ,
"John Gregory" wrote:

I'm having trouble finding what's excluded from use. Is there no list of
forbidden characters? I wanted the macro names to correspond to that of the
charts. Example "1A) MS" ... without the quotes. When that was rejected, I
assumed the bracket was the issue and rewrote to this: "1A_MS". No luck
either. So I assumed numerics as first charter were forbidden and chose:
"Chart 1A_MS". Rejected!

Help please.

 
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Tab Names in Macro Cheri Excel Discussion (Misc queries) 11 June 29th 07 01:28 AM
Macro names Natalie Excel Discussion (Misc queries) 1 March 5th 05 11:53 AM
Macro Names Douglas[_3_] Excel Programming 1 July 27th 04 05:56 PM


All times are GMT +1. The time now is 12:45 PM.

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

About Us

"It's about Microsoft Excel"