Use of GOTO and RUN Macro Commands in ExcelID: Q70476
|
The GOTO macro function branches from the currently running macro and runs the sequence of macro commands at the line or defined name within the GOTO parameters and does not return. The RUN macro function proceeds to run the macro commands at the location specified within the RUN parameters, and when the =RETURN() line is encountered, returns to the macro line immediately following the RUN macro function and finishes running that macro.
Consider the following examples of the GOTO and RUN functions:
A1: =ALERT("this is the first set")
A2: =GOTO(A6)
A3: =ALERT("this is the first set again")
A4: =RETURN()
A5:
A6: =ALERT("this is the second set")
A7: =RUN(A11)
A8: =ALERT("welcome back to the second set")
A9: =RETURN()
A10:
A11: =ALERT("welcome to this third step")
A12: =RETURN()
"Online Help," version 5.0
"Function Reference," version 4.0, pages 213-214, 367-368
"Function Reference," version 3.0, pages 118-119, 202-203
"Functions and Macros," version 2.1x, pages 303, 345
Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 4.0 5.0
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: July 23, 1999