Private Sub mnuOpen_Click()
Dim PrgName As String
Dim Username As String
Dim Passwrd As String
Open (App.Path & "\Data\" & txtProg.Text & ".txt") For Input As #1
Input #1, strblank
Input #1, PrgName
txtProg.Text = PrgName
Input #1, strblank
Input #1, Username
txtUsername.Text = Username
Input #1, strblank
Input #1, Passwrd
txtPW.Text = Passwrd
End Sub
Now to retrieve the txt file I type in the prog name in the txtbox and click open file, but i'd like to use a inputbox instead of having to use that. I would appreciate any help with it.
Private Sub mnuOpen_Click()
Dim PrgName As String
Dim Username As String
Dim Passwrd As String
Dim FileName as String
FileName = InputBox("Please enter the path to the file to open","Open File",App.Path & "\Data\")
Open (FileName) For Input As #1
Input #1, strblank
Input #1, PrgName
txtProg.Text = PrgName
Input #1, strblank
Input #1, Username
txtUsername.Text = Username
Input #1, strblank
Input #1, Passwrd
txtPW.Text = Passwrd
End Sub
Wow, I never thought of that, thanks a lot Noodlez