Solved

Internet Download

Posted on 2001-06-13
4
171 Views
Last Modified: 2013-11-14
How do I download a file and place it in a specific folder without user intervention?  For example, I have a file http://www.mydomain.com/interestrates.mdb that I need to download to the application path.
0
Comment
Question by:northeyk
  • 2
4 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 100 total points
Comment Utility
Add internet transfer control to your project.

Private Sub Command1_Click()
    Dim bytFile() As Byte
    bytFile = Inet1.OpenURL("http://www.mydomain.com/interestrates.mdb", icByteArray)
    Open App.Path & "\interestrates.mdb" For Binary As #1
    Put #1, , bytFile
    Close #1
End Sub
0
 
LVL 8

Expert Comment

by:Dave_Greene
Comment Utility
I would wrap the MDB into a self extracting EXE.  Within WINZIP's Self Extractor you can specify whether you want to run the extractor automatically, also where you want the file to be extracted to.  IMHO this would be the best way.

Cheers
0
 

Author Comment

by:northeyk
Comment Utility
Works great.  Thanks.

Dave.

I can't use a self-extracting zip file because I don't know the application path.  I use InstallShield and the user can change the destination folder.  Thanks anyway.
0
 
LVL 38

Expert Comment

by:PaulHews
Comment Utility
You're welcome.  Happy to help.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

6 Experts available now in Live!

Get 1:1 Help Now