Names.Add method

T

Tetsuya Oguma

Hi all

I'd like to know how to use Names.Add method with MacroType of 2 and what we can do with it. Help cites the following on MacroType parameter of the Add method

Value Meaning
1 User-defined function (Function procedure)
2 Macro (also known as Sub procedure)
3 or omitted None (that is, the name doesn’t refer to a user-defined function or macro)

From my book, I know how to set Name as function but not how to associate it with Macro. I don't see any example of this. Can anyone show me how to do it, please

Cheers
 
T

Tom Ogilvy

This refers to how Excel4 macros were named I believe.

--
Regards,
Tom Ogilvy

Tetsuya Oguma said:
Hi all,

I'd like to know how to use Names.Add method with MacroType of 2 and what
we can do with it. Help cites the following on MacroType parameter of the
Add method.
Value Meaning
1 User-defined function (Function procedure)
2 Macro (also known as Sub procedure)
3 or omitted None (that is, the name doesn't refer to a user-defined function or macro)

From my book, I know how to set Name as function but not how to associate
it with Macro. I don't see any example of this. Can anyone show me how to do
it, please?
 
Top