ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Names.Add method (https://www.excelbanter.com/excel-programming/299928-names-add-method.html)

Tetsuya Oguma[_3_]

Names.Add method
 
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 doesnt 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
--
Tetsuya Oguma, Sydney, Australia

Tom Ogilvy

Names.Add method
 
This refers to how Excel4 macros were named I believe.

--
Regards,
Tom Ogilvy

"Tetsuya Oguma" wrote in message
...
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,
---
Tetsuya Oguma, Sydney, Australia





All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com