P
Paul James
I would like to be able to suspend execution of a VBA procedure in MS Word
so that the user can type some text into a document before the procedure
continues execution, and I would like VBA to resume the procedure when the
user presses the Enter key.
I recently posted this question in another VBA newsgroup, and someone did
offer a solution of bringing up a user form in modeless mode which would
enable the user to enter text in the user form while the procedure was
suspended, enter more text in a text box in the user form, then resume the
original procedure when the (modeless) user form was closed. However, I
would like to offer the user more flexibility during the suspension of the
Sub procedure than simply giving them the chance to enter some text in a
form.
It would be great for this purpose if VBA had some kind of a Pause function
that would temporarily suspend the execution of a Sub procedure until the
user pressed the Enter key or some other key. Can anyone tell me if there
is such a function, or if there's any way I can accomplish this?
Thanks in advance,
Paul
so that the user can type some text into a document before the procedure
continues execution, and I would like VBA to resume the procedure when the
user presses the Enter key.
I recently posted this question in another VBA newsgroup, and someone did
offer a solution of bringing up a user form in modeless mode which would
enable the user to enter text in the user form while the procedure was
suspended, enter more text in a text box in the user form, then resume the
original procedure when the (modeless) user form was closed. However, I
would like to offer the user more flexibility during the suspension of the
Sub procedure than simply giving them the chance to enter some text in a
form.
It would be great for this purpose if VBA had some kind of a Pause function
that would temporarily suspend the execution of a Sub procedure until the
user pressed the Enter key or some other key. Can anyone tell me if there
is such a function, or if there's any way I can accomplish this?
Thanks in advance,
Paul