Hello, I'm kind of troubled by this. How do I write to the second line of the text file? I'm using this code, to add encrypted text (in hex) to line one, and read it and validate it. I need to know how to add it to line 2, 3, 4, ect. Thank you for your help.
VB Code:
Sub addpw() Dim ff%, i% ReDim user(0) ReDim pass(0) index = 0 user(0) = InputBox("Enter User Name") pass(0) = InputBox("Enter Password") maxindex = 1 ff = FreeFile Open (App.Path & "\login.txt") For Output As #ff For i = 0 To maxindex - 1 Print #ff, StrToHex(user(i)) & " | " & StrToHex(pass(i)) Next i Close #ff
And I would call it to add the text by doing so:VB Code:
Private Sub Form_Load() Call addpw user(0) = "Username" pass(0) = "Password" End Sub
The bottom calls the top code, to add "Username" and "Password" encrypted in hex, on the first line of a text file. I need to be able to add it to the second line so I could do something like:VB Code:
Form_Load() Call addpw user(0) = "Username" pass(0) = "Password" user(1) = "Username1" pass(1) = "Password1" user(2) = "Username2" pass(2) = "Password2" End Sub
I think you get the point, thanks alot guys
Also, once I have that done, how would I get it to check not only the first line, but the second one too, to validate it.





Reply With Quote