The information in this article applies to:
SUMMARY
If a macro is renamed by the person using it, this can cause problems
with such macro statements as ACTIVATE and SAVE.
MORE INFORMATIONThe following macro is defined as auto_open and therefore will run every time the macro sheet is opened: A1: auto_open A2: =ACTIVATE(WINDOWS()) ;In case all windows are hidden A3: =FORMULA.GOTO(A1) ;Goes to A1 on running macro sheet A4: =GET.DOCUMENT(1) ;Name of active sheet (this one) A5: =RETURN() ;end macro The value in cell A4 contains the name of the macro sheet after this macro is run. Because this name is text, it can be used in any subsequent function requiring the macro name. For example: =ACTIVATE(A4) The above function will activate the macro whose name was returned by cell A4. REFERENCES"Microsoft Excel Function Reference," version 4.0, pages 172-173 "Microsoft Excel Function Reference," version 3.0, page 93 "Microsoft Excel Functions and Macros," for the Macintosh, version 2.2, page 227 Additional query words: macrosheet function command
Keywords : |
Last Reviewed: March 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |