CodeLiftsleep
Member
- Joined
- Mar 11, 2016
- Messages
- 20
- Programming Experience
- 3-5
Not sure what the issue is, I am working on a project in WPF, and have the following code for a OpenDB Button.click event handler:
The code runs once, exits the sub and then runs a second time...the button is only getting pushed one time, so I don't understand why its being run again for a second time through.
Any help would be appreciated...it's a minor nuisance but its really annoying to have to select the same file twice...
VB.NET:
Private Sub OpenDB_Click(sender As Object, e As RoutedEventArgs) Handles OpenDB.Click 'Allows user to choose which DB to open
Dim MyOFD As New OpenFileDialog
MyOFD.Filter = "SQLite DataBase Files (*.sqlite)|*.sqlite"
If MyOFD.ShowDialog = DialogResult.OK Then
MyFilePath = MyOFD.FileName
MyFilePath = (Replace(MyFilePath, "Football.sqlite", ""))
End If
End Sub
The code runs once, exits the sub and then runs a second time...the button is only getting pushed one time, so I don't understand why its being run again for a second time through.
Any help would be appreciated...it's a minor nuisance but its really annoying to have to select the same file twice...