»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 06-05-2003, 11:12 AM   #1 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 3
ahc94 is on a distinguished road
Systems download a file from FTP site in VBA

Hi,

I have two questions and don't know how to do it.

1. connect to a FTP site and download a zip file.
2. unzip the file

i am using Access 2000 and writing codes in VBA.

i would appreicate if anyone can help me on either one of my questions.

Thanks in advance..

Andy

ahc94 is offline   Reply With Quote
Old 06-05-2003, 11:16 AM   #2 (permalink)
Guest
Guest
 
Posts: n/a
to connect to an ftp you can use internet explorer or any client program

in ie

type

Ftp://username: password@ipaddressort number if its not 21

now ie can be a pain if the ftp is behind a firewall

ws_ftp or smart ftp are free programs that are easy. you will need an account with the ip adddress and port for the ftp

to unzip you will need a program like winzip or winrar

hope that helps
  Reply With Quote
Old 06-05-2003, 11:54 AM   #3 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 3
ahc94 is on a distinguished road
Thanks for your reply, GroundZero3. I can not use IE because all of codes are written in VBA. It's like when the user clicks the commmand button in Access Form, the program sould be able to connect to the FTP site and download the file.

thanks, anyway.
ahc94 is offline   Reply With Quote
Old 06-05-2003, 03:16 PM   #4 (permalink)
Registered User
 
Join Date: Feb 2000
Posts: 79
youngqd is on a distinguished road
activeX DLL manages asynchronous data downloads
http://www.vbaccelerator.com/codelib/submit/asynctx.htm
class enables zipping files
http://www.vbaccelerator.com/codelib/zip/zip.htm

ooops just noticed 'VBA' not VB, youre on your own there

Last edited by youngqd; 06-05-2003 at 03:20 PM.
youngqd is offline   Reply With Quote
Old 06-05-2003, 04:41 PM   #5 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 3
ahc94 is on a distinguished road
Thanks, youngqd. I really appreciate it.
I found a sample which might be the solution.

Public Sub ExportFTP()
Dim sSCR As String,
sDir As String, sExe As String

sSCR = CurrentProject.Path & "\AccessFTP.scr"
sSCR = GetShortFileName(sSCR)

sDir = Environ$("COMSPEC")
sDir = Left$(sDir, Len(sDir) - Len(Dir(sDir)))
sExe = sDir & "ftp.exe -s:" & sSCR

Shell sExe, vbMaximizedFocus

Somehow, when I run the codes, I got an error "can't find project or library" and highlighted on "Environ$". Don't know why? Any suggestion..........
ahc94 is offline   Reply With Quote
Old 06-06-2003, 12:53 PM   #6 (permalink)
Registered User
 
Join Date: Feb 2000
Posts: 79
youngqd is on a distinguished road
I can write enough VB to impress the girls in the office.
But to answer your questions I would soon make a complete fool of myself.
I did work through the exercises in 'Microsoft Access 2000 VBA Fundamentals' by Evan Callahan.
Got to where I could launch Explorer from a database of links.
He mentions FTP but gives no examples.
May I suggest you go over here
http://www.tek-tips.com/gthreadminde...ev3/27/pid/705
or
http://www.winsockvb.com/forums/index.php?s=
and get far better advise than I have.
Good Luck!

Last edited by youngqd; 06-06-2003 at 01:01 PM.
youngqd is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 04:05 AM.