Got the OpenFileDialog working
I messed up the .Filter syntax.
[vba]Private Sub cmdGetFile_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles cmdGetFile.Click
' Retrieves the filename to connect to
With Me.OpenFileDialog1
.CheckFileExists = True
.Multiselect = False
.ShowReadOnly = False
.Filter = "All Excel Files (*.xls*)|*.xls*"
If .ShowDialog = Windows.Forms.DialogResult.OK Then
' Set the textbox to hold the file path
txtFileName.Text = .FileName
End If
End With
End Sub[/vba]