log in to FTP using VBA

Sowmya N 1 Reputation point
2020-12-09T07:10:32.81+00:00

I'm trying to access FTP using hostname, username & password. need to access the particular folders and copy the latest file to my local path.
Copying the latest file is working using the below code. Could someone probably help me to append the code with FTP login

Sub test()
Dim myFile As String, Result As String
Const TargetFolder As String = "D:\Wolken\Pending Report\Files\"
Const myPath As String = "D:\Test\"
myFile = Dir(myPath & "*.csv")
Do While myFile <> ""
If myFile > Result Then Result = myFile
myFile = Dir
Loop
FileCopy myPath & Result, TargetFolder & Result
End Sub

Community Center Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-12-09T16:07:25.943+00:00

    Excel development is not currently supported here on QnA. They're actively answering questions in dedicated forums here.
    https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-msoffice_custom
    https://social.msdn.microsoft.com/Forums/Lync/en-US/home?forum=exceldev

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.