Sorry pretty much a newbie on VBA. Trying to use VBA to open a CSV file on a FTP server with username and password. Server is an IP address. I found the code below on another thread and am confused on the FilePath line and what I put in for "@ftp.XXXXXXX.com/MEMCARD1/FC_files/flow.csv". Where MEMCARD1/FC_files/flow.csv/flow,csv is file I am trying to open on IP address 172.16.0.10. Any help is appreciated. Thanks
Sub test()
Dim FTPuser, FTPpassword, FilePath, RawWB
FTPuser = "username"
FTPpassword = "password"
FilePath = "ftp://" & FTPuser & ":" & FTPpassword & "@ftp.XXXXXXX.com/MEMCARD1/FC_files/flow.csv"
Set RawWB = Workbooks.Open(Filename:=FilePath, ReadOnly:=True)
RawWB.Activate
End Sub
Sub test()
Dim FTPuser, FTPpassword, FilePath, RawWB
FTPuser = "username"
FTPpassword = "password"
FilePath = "ftp://" & FTPuser & ":" & FTPpassword & "@ftp.XXXXXXX.com/MEMCARD1/FC_files/flow.csv"
Set RawWB = Workbooks.Open(Filename:=FilePath, ReadOnly:=True)
RawWB.Activate
End Sub