Hi everybody!![]()
I'm building a program with a login box in the beginning...this is my code:
VB Code:
Dim pass As String Set oFTP = New CFtp oFTP.Connect "ftp.guitar.gratisplaneten.com", "xxxxxx", "xxxxxxxx" oFTP.TransferType = FTP_TRANSFER_TYPE_ASCII 'or FTP_TRANSFER_TYPE_BINARY oFTP.DownloadFile username & ".txt", "/guitar.gratisplaneten.com/adam/users/" & username & ".txt" Dim oFile As CFtpFile For Each oFile In oFTP.Files If oFile.IsDirectory Then List1.AddItem "[" & oFile.FileName & "]" Else List1.AddItem oFile.FileName End If Next oFTP.CloseConnection Open username & ".txt" For Input As #1 Input #1, pass If pass <> password Then Close Kill username & ".txt" MsgBox "The username or password is incorrect" Else Input #1, points Close Kill username & ".txt" Load frm_main frm_main.Caption = frm_main.Caption & " - Logged in as " & username & " [" & points & " points]" frm_main.Show 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





Reply With Quote