Solved

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

Posted on 2003-10-26
4
540 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:wonda04
  • 2
4 Comments
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 9625652
Why don't you post the appropriate WSH code then we can convert it to VB.
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 125 total points
ID: 9626592
should you pass this call in urldownloadtofile?


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

Author Comment

by:wonda04
ID: 9631806
Thanks Richie_Simonetti.  I obviously missed the obvious. = )
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9633539
"I obviously missed the obvious."

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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question