Editing a Worksheet Formula from a Macro in ExcelLast reviewed: November 2, 1994Article ID: Q37506 |
The information in this article applies to:
SUMMARYWhen you edit a formula contained in a worksheet from a macro, using the SEND.KEYS function replicates the manual editing steps, as the following example illustrates:
=ACTIVATE("sheet1.xls") =SELECT("r12c2") =SEND.KEYS("{F2}editingtext~")In the SEND.KEYS line, {F2} takes you into edit mode on the formula bar. "editingtext" is the string of keystrokes to press if you are manually editing the formula. The tilde (~ or {ENTER}) terminates the edit mode and enters the formula into the selected cell. Note: The SEND.KEYS text is not sent until a dialog box is displayed, or the macro is finished, so the above cannot be repeated in a macro.
MORE INFORMATIONExamples of SEND.KEYS function editing are as follows:
REFERENCESFor more information on using the SEND.KEYS function, query on:
send.keys and on.time |
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |