OR do one thing try this it must work perfectly.........!
Code:
Private Sub ViewPrevious_Click()
Dim Temp As String
Dim i As Integer
Dim Found As Boolean
Dim SavedUserChoices As String
Dim ConfigSaveName() As String
i = 1
Found = False
SavedUserChoices = InputBox$("Please enter the filename you would like to open", "Open Another Previous Configuration File")
UserChoiceWindow.Show
Open "Open "N:\Computing\Advanced Higher Project\SavedConfigIndex.txt" For Input As #3" For Input As #3
Temp = Input(LOF(3), #3)
Text1.Text = Temp
Close #3
ConfigSaveName() = Split(Temp, ",")
If UBound(ConfigSaveName) > 0 Then
Do While Found = False
If SavedUserChoices = ConfigSaveName(i) Then
Found = True
Else
i = i + 1
End If
Loop
End If
If Found = False Then
MsgBox("File not found!", vbOKOnly + vbInformation, "No Such File")
Exit Sub
Else
Open SavedUserChoices For Input As #1
UserChoiceWindow.ChoicesChosen.Text = Input$(LOF(1), 1)
Close #1
End If
End Sub
Bookmarks