Here is the code I wrote:
Option Explicit
Sub getFTPFile()
Dim strDirectoryList As String
Dim Str_Dir As String
Dim Int_FreeFile01 As Integer
Dim Int_FreeFile02 As Integer
Dim sPATH As String
Dim sSITE As String
Dim sUSER As String
Dim sPASS As String
Dim sDIR As String
Dim sFILE As String
sPATH = Sheets(1).Cells(10, 4).Value 'local computer path
sSITE = Sheets(1).Cells(7, 4).Value 'ftp server address
sUSER = Sheets(1).Cells(8, 4).Text 'username
sPASS = Sheets(1).Cells(9, 4).Value 'password
sDIR = Sheets(1).Cells(11, 4).Value 'remote directory
sFILE = Sheets(1).Cells(14, 4).Value 'file to download
On Error GoTo Err_Handler
Str_Dir = sPATH
Int_FreeFile01 = FreeFile
Int_FreeFile02 = FreeFile
strDirectoryList = Str_Dir & "\Directory"
' Delete completion file
If Dir(strDirectoryList & ".out") <> "" Then Kill (strDirectoryList & ".out")
' Create text file with FTP commands
Open strDirectoryList & ".txt" For Output As #Int_FreeFile01
Print #Int_FreeFile01, "open " & sSITE
Print #Int_FreeFile01, sUSER
Print #Int_FreeFile01, sPASS
Print #Int_FreeFile01, "cd " & sDIR
Print #Int_FreeFile01, "hash"
Print #Int_FreeFile01, "prompt"
Print #Int_FreeFile01, "binary"
Print #Int_FreeFile01, "get " & Str_Dir & "\" & sFILE
Print #Int_FreeFile01, "bye"
Close #Int_FreeFile01
' Create Batch program
Open strDirectoryList & ".bat" For Output As #Int_FreeFile02
Print #Int_FreeFile02, "ftp -s:" & strDirectoryList & ".txt"
Print #Int_FreeFile02, "Echo ""Complete"" > " & strDirectoryList & ".out"
Close #Int_FreeFile02
' Invoke Directory List generator
Shell (strDirectoryList & ".bat"), vbNormalFocus ', vbHide '', vbMinimizedNoFocus
'Wait for completion
Do While Dir(strDirectoryList & ".out") = ""
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:03"))
' Clean up files
If Dir(strDirectoryList & ".bat") <> "" Then Kill (strDirectoryList & ".bat")
If Dir(strDirectoryList & ".out") <> "" Then Kill (strDirectoryList & ".out")
If Dir(strDirectoryList & ".txt") <> "" Then Kill (strDirectoryList & ".txt")
bye:
Exit Sub
Err_Handler:
MsgBox "Error : " & Err.Number & vbCrLf & "Description : " & Err.Description, vbCritical
Resume bye
End Sub