Word macro - pause

B

Bumps Grandad

How do I get a macro to pause and wait for keyboard input and then to resume?
 
J

Jay Freedman

On Wed, 11 Jun 2008 16:31:02 -0700, Bumps Grandad <Bumps
How do I get a macro to pause and wait for keyboard input and then to resume?

If you mean you want the macro to pause while the user types something into the
document, Word macros don't typically work that way. If you're coming from
WordPerfect, it's understandable that you'd expect it, but Word has better
alternatives.

VBA has an InputBox() function that will display a prompt and return the user's
input to a string variable in the macro, and then the macro can do various
things with that string such as inserting it into the document. But that's
usually considered a very amateurish technique.

What are you trying to accomplish? When we know that, we can probably suggest a
better way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top