Can VBA be used to download information from an online sharefile?

dan7055

Active Member
Joined
Jul 9, 2015
Messages
312
Hello all,

My job requires me to download a great deal of information from an online share-file onto local directories on a daily and weekly basis. This consumes a lot of time. Now I know that it is possible to create a macro that can logon and navigate through a webpage, but can the macro also search that webpage for specific files that need to be downloaded, and then download them to specific places?

Just wondering if this is possible, and if so, where I can start.

Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi Dan,

that should be possible, but it could take some time to write that macro. But if it, in the end, saves a lot of time, it might be worth it.

For starters, the winHTTP object seems te be the best way to communicate with a webpage, although you could also try to launch IE from Excel and control IE to log in and download certain files. If you browse to a website (or make your code do so), the site will return the webpage, from which you can extract/search for the files you're looking for. These links might get you started:

http://www.mrexcel.com/forum/excel-questions/353006-download-file-excel.html
excel - VBA WinHTTP to download file from password proteced https website - Stack Overflow

If you have some code and get stuck, please do post it here.

Cheers,

Koen
 
Upvote 0

Forum statistics

Threads
1,225,759
Messages
6,186,864
Members
453,380
Latest member
ShaeJ73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top