MrMajik
IS-IT--Management
- Apr 2, 2002
- 267
I am integrating FTP into my program. On the web side I intentionally removed the file I want to download to prepare an error handler in the event this may really happen. When I attempt to download the (missing) file I get the following message box:
Title of the message box: Error Copying File or Folder
Message in the message box: An error occured while copying the file.
As you can see there is no error number. This program runs unattended so I need a way to handle this. Any ideas?
Here is the code:
Thank you.
Title of the message box: Error Copying File or Folder
Message in the message box: An error occured while copying the file.
As you can see there is no error number. This program runs unattended so I need a way to handle this. Any ideas?
Here is the code:
Code said:Option Explicit
Dim x As Integer
Private Sub btnDownload_Click()
On Error GoTo ErrorHandler
Dim ftpFolder As Folder
Dim myShell As Shell
Set myShell = New Shell
Set ftpFolder = myShell.NameSpace("C:\atest\")
ftpFolder.CopyHere "ftp://meassword@012.123.210.21//myweb.com/myfile.html"
Exit Sub
ErrorHandler:
x = x
End Sub
Thank you.