Solved

Internet Download

Posted on 2001-06-13
4
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 100 total points
ID: 6187037
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
ID: 6187077
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
ID: 6187475
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
ID: 6187614
You're welcome.  Happy to help.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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