ecoast Posted April 28, 2008 Report Share Posted April 28, 2008 I have a macro to perform repetitive data entry on the web. The Macro feeds from a CSV file via a user-prompted, incremented loop. All data to be entered for each incremented round, comes from a single line in the CSV file, then moves to the next line... The only problem I see to be having now is, while data is being entered on the web, sometimes the web pages time out, and in this case a Refesh is not the solution. What I need to happen is for the Macro to close the current IE window, and return to the top of the loop and start over. I am having some trouble with some of th repeat commands, so i felt comfortable asking someone who may already have this in use Help is appreciated! Thanks! Quote Link to comment Share on other sites More sharing options...
stan Posted April 28, 2008 Report Share Posted April 28, 2008 Currently there is not a way to instruct a macro to return to a specific line and start again from that location. In your case, the only thing I can suggest is to insert an If statement within the ASCII process loop that somehow determines if the page has quit responding. If it has, then close IE, restart it, and then place all of the necessary commands from the ASCII process loop after the If statement. Close with an End If. So, if the page times out, the macro goes to the If statement and runs all of the commands before the End If. If it doesn't time out, then the If section of the macro is skipped. Quote Link to comment Share on other sites More sharing options...
Cory Posted April 29, 2008 Report Share Posted April 29, 2008 What I do is to use the ASCII File Process but in the command I start at record N1 and process one record. It's a neat way to go in and grab a specific line. Then outside I have an infinite repeat loop that increments N1. This way I can control the logic better to recover from a failure. So put a repeat loop around the ASCII File Process and the actions you are preforming and include some test for success. This way you can keep repeating this until T1=Success and once it exits the loop on this criteria it goes to the master loop that increments N1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.