Downloading a file from a password protected website

evuillet

New Member
Joined
Jul 12, 2011
Messages
1
Hello all,

I am currently trying to write a VBA program that would download excel files from a password protected website.
The first issue that I have is that the function URLDownloadToFile doesn't work as the files are protected.
The second issue that I have, is that when I navigate the webpage with VBA and that I find the link to the file, when I do the "IE.navigate file_url", sometimes it directly opens the file in excel, and sometimes the popup "File Download" appears.
I would like to know if it it possible to force this popup to open (something like a right click on the link followed by a click on "save target as"), or if a function like URLDownloadToFile could directly connect to my IE, and avoid the login and password already entered in the website.

Thank you very much for your help,

Edouard
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,215,635
Messages
6,125,940
Members
449,275
Latest member
jacob_mcbride

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