I've been working through these boards for two days asking questions and trying to clarify my problem with this code and I finally figured it out!!! WOOHOO!
To those of you who guided me to finding the solution I am grateful! I thought I would post what I finally discovered through trial and error with regard to adding string variables to an operational statement inside the Inet Execute command.
Here ya go! This works!
Thanks so much!! I couldn't do it without you all in these forums!! You are all incredibly helpful!Code:Option Explicit Dim strFileName As String Dim strFileTitle As String Dim strSend As String Private Sub Form_Load() strFileName = CommonDialog1.FileName strFileTitle = CommonDialog1.FileTitle strSend = """" & strFileName & """""" & strFileTitle & """" MsgBox strSend If strFileName <> "" Then Call Transfer Else MsgBox "You need to enter a file to send." End If End Sub Private Function Transfer() With Inet1 .Protocol = icFTP .URL = "xxx.xxx.xxx.xxx" .UserName = "xxxx" .Password = "xxxx" .Execute , "PUT " & strSend End With End Function


Reply With Quote