Opening an FTP Site with VBA script

ebbo

Registered User.
Local time
Today, 12:53
Joined
Sep 2, 2009
Messages
30
Hello people,

I have the following script and it works on my PC. It will open IE and go to FTP directory. Im using IE8. My colleague who also uses IE8 only gets a blank screen. This is on a button that takes values from two fields (FTP_Username & FTP_password)


Code:
Private Sub Open_FTP_Click()
On Error GoTo err_fields
Dim Text1 As String
Dim Text2 As String
FTP_username.SetFocus
Text1 = FTP_username.Text
FTP_password.SetFocus
Text2 = FTP_password.Text
Application.FollowHyperlink _
"ftp://" & Text1 & ":" & Text2 & "@mysite.mycompany.com"
Exit Sub
err_fields:
MsgBox "Could not connect to the FTP Account, Please check FTP account details"
End Sub

What is the best way to open an FTP directory? I would prefer to open the users default web browser and do it that way. Please could someone help with sample code:)
 
I use DOS to manipulate my files on my server. you can find the code I use in the code rep. forum here. Its one of the top 5 newest threads in there. it might be useful
 
I use DOS to manipulate my files on my server. you can find the code I use in the code rep. forum here. Its one of the top 5 newest threads in there. it might be useful


Hello,

I dont actually want to manipulate the files, I simply want to list the contents of the FTP, so that the files are available to download for the user. They just choose the one they want. Does anyone have a way to list the FTP contents....the easiest way would just be to open a browser in my opinion...but as i said it doesnt work for my colleague for some reason.
 

Users who are viewing this thread

Back
Top Bottom