Solved

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

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

12 Experts available now in Live!

Get 1:1 Help Now