The information in this article applies to:
SUMMARYFunction macros can be nested by either specifically stating the name of the submacro in the dependent function macro, or by dynamically passing the name of a function macro to the dependent macro as a parameter. (Note: this is true for version 5.0 macro sheets, but not modules.) MORE INFORMATION
A function macro can call a second function macro by specifically
calling the second function macro. This would cause the main function
macro to execute, then call the second function macro. When the second
function macro is finished, it will return the calculated value to the
location where it was called.
Spreadsheet Call to the Function Macro "Function"
Function Macros on MACRO1.XLM
A function macro can also call a second function macro dynamically by passing the name of the submacro to the main function macro. This is a more advanced feature of function macros. You can define your own special macro to be called through the main function macro. The name of the submacro is stored in a variable on the macro sheet. This variable can be used to call the actual submacro, which then follows the same method as stated above. For example: Spreadsheet Call to the Function Macro "Function"
Function Macros on MACRO1.XLM
NOTE: Both the macros, "Main" and "Add" must be defined as function macros by choosing Define Name from the Formula menu. For more information on function macros, see Pages 176-182 of the "Microsoft Excel for Windows Functions and Macros" manual and the "Microsoft Excel for OS/2 Functions and Macros" manual. REFERENCES"Functions and Macros," versions 2.x, pages 176-182 "User's Guide," version 3.0, pages 567-576 Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 4.0 4.0a 4.00a 5.0
Keywords : |
Last Reviewed: July 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |