I have a form that contains two text boxes where the user can type in file paths, I want to check to see if the file path entered into the textboxes are valid when the user clicks on the accept button. Here is my code
Private Sub btnAccept_Click()
Dim OpenFile As Integer
OpenFile = FreeFile
'Create and write to .ini file
Open App.Path & "\HistoricalPlayback.ini" For Output As OpenFile
Print #OpenFile, "File Configuration: " & txtFFP
Print #OpenFile, "Database Configuration: " & txtDBFP
Close OpenFile
If Dir$(txtFFP.Text) <> "" Or Dir$(txtDBFP.Text) <> "" Then
Exit Sub
Else
MsgBox "Enter Valid File Path"
End If
glbFilePath = txtFFP.Text
glbDBPath = txtDBFP.Text
End Sub