View Single Post
  #1 (permalink)  
Old April 12th, 2007, 11:19 AM
renu2214 renu2214 is offline
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default closing an inet1 connection

Hi,
I am downloading files, through inet1 ftp. I want to close a conenction , on clicking of a button cancel. However I do get errors such as Still executing last request. Please help me with this. it is urgent.
some part of code, i tried all the methods,

If Inet1.StillExecuting = True Then
            FinishCmd
            Inet1.Execute , "QUIT"
            FinishCmd
                Inet1.Cancel
                'FinishCmd
                Inet1.Execute , "CLOSE"
                FinishCmd
            Else
                Inet1.Cancel
                'FinishCmd
                Inet1.Execute , "CLOSE"
                FinishCmd

            End If

Public Sub FinishCmd()
    Do While frmBackUp.Inet1.StillExecuting
        DoEvents
    Loop
End Sub