Results 1 to 3 of 3

Thread: Suddendly terminating sub ;-(

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Unhappy

    I have some code like this:

    Code:
      Select Case UCase(todo)
       Case ...
       Case "SENDF"
        ...
        HostSendFile ...
       Case ...
       Case Else
      End Select
     End Sub
    
     Sub HostSendFile(FileName As String)
      ...
       If HostFile.State = sckConnected Then 'Winsock
        ...
       Else
        ...
       End If
      ...
      Open ...
      ...
     End Sub
    I succesfuly pass the select case routine to call HostSendFile. But I have found, that practically allways is this sub terminated (I tried to debug the sub and suddenly it hopped to End Select statement). At first, I thought it is the winsock's error, because it was happening at if routine; but later I found it is happening whenever in this sub.

    How to run the sub to the end or where is the problem?

  2. #2
    Guest
    Brute force method:

    [code]
    dim errpoint as integer
    <font color="#00007F">On</font> error goto Someplace

    errpoint=0
    1st line of suspected code

    errpoint=1
    2nd line of suspected code
    .....


    Someplace:
    debug.print errpoint

    Good Luck
    DefFarm

  3. #3
    Guest
    Why did my post come up with the funny stuff before the code?


    I used the openbracket code closebracket keyword.

    DerFarm


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width