ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I stop a macro for Human Interaction (https://www.excelbanter.com/excel-programming/323602-how-can-i-stop-macro-human-interaction.html)

Henry Stock

How can I stop a macro for Human Interaction
 
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 :-)




Claud Balls

How can I stop a macro for Human Interaction
 
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.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

David

How can I stop a macro for Human Interaction
 
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

"Henry Stock" wrote:

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 :-)






All times are GMT +1. The time now is 07:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com