I get an "Illegal Operation" error and VB crashes with the following code:
Code:
Private Sub Upload()  
   With form1.Inet1
     .Cancel
     .Protocol = icFTP
     .URL = "FTP://ftp.whatever.com"
     .UserName = "username"
     .Password = "password"
     .Execute , _
         "PUT " & local & " " & remote
      DoLoop     
      .Execute , "QUIT" ' Close the connection.
      DoLoop    
    End With
End Sub

Private Sub DoLoop()
    Do
        DoEvents
    Loop While form1.Inet1.StillExecuting
End Sub
It gets through all this, but it crashes when I unload the form. Please help!