Halting Macro for User Input in ExcelID: Q62290
|
Lotus 1-2-3 allows the use of the "?" (the question mark [without
quotation marks]) to temporarily suspend macro execution while waiting
for your input. Microsoft Excel, however, does not allow halting the
macro to wait for your input without using an INPUT() or similar
command.
To mimic the "?" in a Lotus macro, the following macro segment can be
used to halt a macro to wait for your input, without using an INPUT()
or related function:
On.time sub-macro to halt macro and wait for user input
=ON.TIME(NOW()+0.0000000001,"(reference to resume calling macro)")
=SEND.KEYS("{f2}")
=RESTART()
=RETURN()
=ON.TIME(NOW()+0.0000000001,"(reference to resume calling macro)")
=SEND.KEYS("(%r)n")
=RESTART()
=RETURN()
Additional query words: 2.0 2.01 2.1 2.2 2.20 2.21 3.0 3.00 4.0 4.00 4.0a 4.00a 5.0 pause pausing
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 21, 1999