Solved

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

Posted on 2003-10-26
4
534 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

947 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now