VBA: How to download file to disk from site with authenticated login id and password

wonda04
wonda04 used Ask the Experts™
on
In VBA, I would like to be able to click on a button and have a file downloaded from a site to my harddrive.  The site where the file is located requires a login UserID and password.
I've successfully have this working with a WSH script, however, I need this to work from VBA.

I've tried the URLDownloadToFile API but it doesn't accomodate for username/password arguments.

Any thoughts?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Why don't you post the appropriate WSH code then we can convert it to VB.
should you pass this call in urldownloadtofile?


"http://username:password@www.domain.com/somefolder/somefile.xxx"

Author

Commented:
Thanks Richie_Simonetti.  I obviously missed the obvious. = )
"I obviously missed the obvious."

Why?, we have times of shine and times of darkness (All of us).
;)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial