ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to access a downloaded file before VBA ends (https://www.excelbanter.com/excel-programming/376669-how-access-downloaded-file-before-vba-ends.html)

JExec

How to access a downloaded file before VBA ends
 
I'm having problems accessing a file that was downloaded via VB. The
file does not appear until all code is executed. I need to copy and
paste data from the downloaded file to an existing file. I tried using
wait and sleep but nothing works. It seems the only thing that will
work is to simulate hitting the reset button, wait a few seconds for
the file to load, and then run the rest of the code. I need to be able
to do this so that an end user won't be able to know whats going on (ie
the visual basic window should never be visible). Any ideas??


Thanks in advance!

Josh


Tom Ogilvy

How to access a downloaded file before VBA ends
 
How are you downloading the file. What commands are you using?

--
Regards,
Tom Ogilvy


"JExec" wrote:

I'm having problems accessing a file that was downloaded via VB. The
file does not appear until all code is executed. I need to copy and
paste data from the downloaded file to an existing file. I tried using
wait and sleep but nothing works. It seems the only thing that will
work is to simulate hitting the reset button, wait a few seconds for
the file to load, and then run the rest of the code. I need to be able
to do this so that an end user won't be able to know whats going on (ie
the visual basic window should never be visible). Any ideas??


Thanks in advance!

Josh



JExec

How to access a downloaded file before VBA ends
 
Thanks Tom for replying. I'm simulating web browsing and using sendkey
{ENTER} to do the actual "open" command on the file download prompt.


Tom Ogilvy wrote:
How are you downloading the file. What commands are you using?

--
Regards,
Tom Ogilvy


"JExec" wrote:

I'm having problems accessing a file that was downloaded via VB. The
file does not appear until all code is executed. I need to copy and
paste data from the downloaded file to an existing file. I tried using
wait and sleep but nothing works. It seems the only thing that will
work is to simulate hitting the reset button, wait a few seconds for
the file to load, and then run the rest of the code. I need to be able
to do this so that an end user won't be able to know whats going on (ie
the visual basic window should never be visible). Any ideas??


Thanks in advance!

Josh





All times are GMT +1. The time now is 10:40 AM.

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