Question Locked

How to pause vba execution without stopping downloading of csv file

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am downloading a csv file using FollowHyperlink. Since it downloads the file to a separate workbook then the one I am working on, I need to copy and paste it. Unfortunately, the VBA code continues to execute even though the csv data has not loaded in the new workbook yet.

Every time I try to use any version of wait or timer functions, it pauses the downloading process.

When stepping through the code, everything works perfectly because the intermittent breaks transfers processing priority back to the downloading process. Is there anyway to program VBA to give-up processing priority for a couple seconds thereby simulating a VBA break?

2 replies

by cknudstrup

One thought would be to use a form with a load complete button on it so after to process the load csv file command you open the form and the user clicks the single button on the form when the csv file is loaded then the buttons code runs a procedure with the rest of your code.

regards
Christian

This discussion is closed to new replies.