Hi everybody!

I'm building a program with a login box in the beginning...this is my code:

VB Code:
  1. Dim pass As String
  2. Set oFTP = New CFtp
  3. oFTP.Connect "ftp.guitar.gratisplaneten.com", "xxxxxx", "xxxxxxxx"
  4. oFTP.TransferType = FTP_TRANSFER_TYPE_ASCII 'or FTP_TRANSFER_TYPE_BINARY
  5. oFTP.DownloadFile username & ".txt", "/guitar.gratisplaneten.com/adam/users/" & username & ".txt"
  6. Dim oFile As CFtpFile
  7. For Each oFile In oFTP.Files
  8.     If oFile.IsDirectory Then
  9.         List1.AddItem "[" & oFile.FileName & "]"
  10.     Else
  11.         List1.AddItem oFile.FileName
  12.     End If
  13. Next
  14. oFTP.CloseConnection
  15. Open username & ".txt" For Input As #1
  16.     Input #1, pass
  17. If pass <> password Then
  18.     Close
  19.     Kill username & ".txt"
  20.     MsgBox "The username or password is incorrect"
  21. Else
  22.     Input #1, points
  23.     Close
  24.     Kill username & ".txt"
  25.     Load frm_main
  26.     frm_main.Caption = frm_main.Caption & " - Logged in as " & username & " [" & points & " points]"
  27.     frm_main.Show
  28. End If

My problem is that I get an "Run-time error '53': File not found" when I run the code.
The problem is that it can't open the username file since it hasn't been downloaded...why is this?

The FTP stuff I'm using is Joackim Anderssons code here.

If you have any problems understanding my code...plz say so. Then I can describe what the code does.

Happy for help!

//Alex