How can I stop a macro for Human Interaction

  • Thread starter Thread starter Henry Stock
  • Start date Start date
H

Henry Stock

I built a macro that alters multiple files, but the input data is
occasionally unreliable in that:
1. there may be more columns source data than I expect

While this is really too problems one of my answers to finding the issues is
to pause the macro in a way that
the user can double check the data manually and perhaps alter certain things
before continuing.

For the First part My plan would be to put this pause just before the data
in question is saved. As long as the dialog is nonmodal I should be able to
do what I want
Can anybody show me some code for this?




Thanks Henry :-)
 
I would import the data, then progamatically remove any columns that
don't belong, so no human intervention was required. If this won't work
please be more specific.
 
Hi Henry,
It seems putting in a Input Box, asking if the user is ready to save or
would like to change data, woud do this for you. Then the useer can respond
to either save or add data. Something like this:
Sub Macro1()
Dim Message, Title, Default, MyValue
Message = "Save or Enter more data?"
Title = "Save or enter more data?"
Default = "Save" ' Set default.
MyValue = InputBox(Message, Title, Default)
If MyValue <> "Save" Then GoTo Bottom
Stop
'Save file routine
Bottom:
End Sub
 

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

Back
Top