vb Code:
  1. Dim ret As Boolean
  2. ' some other code
  3. ret = FtpPutFile(server, fname, fname, FTP_TRANSFER_TYPE_BINARY, 0)
  4. If Not ret Then myip = ""
  5. ' more code
when i declare ret like this the myip = "" runs everytime regardless of whether ret is true or false
if i don't declare ret and leave it to vb to cast it as a variant then ret will still return true or false and the if statement runs correctly

what logic am i missing about declaring ret?