Can a macro pause for a data entry before finishing?

R

Rick Rothstein

You can use an InputBox to take the new data in... the program will pause
for the user to enter the value...

Dim NewData As Variant
....
....
NewData = Application.InputBox("Give me the new data.")
'
' Do whatever you want with the contents of the NewData
' variable. You may want to check to make sure the user
' actually entered a value before attempting to use the value.
'
 
J

Jim Thomlinson

In short... No. there are a few techniques I have seen posted but in general
they all have pretty significant drawbacks. Here is what you can do

1. Use an input box to get info from the user (good if you only want really
simple input)

2. Use a user form to get user input (good for more complex input)

3. End the macro at the point of requireing input. Catch change events
occuring in the spreadsheet to initiate the final code.
 

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