Hi,
I did try it, but it was showed up all the time with focus in the filename
textbox.
Did you know this is terrible bad code you use.
A catch block without an action on the catch from the exception.
But what does not get the focus, because it did work al the time with your
code before I did change it to this.
(And I think there is something more because you made that try catch block)
Cor
\\
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim openFileDialog1 As New OpenFileDialog
openFileDialog1.Filter = "Excel files (*.xls)|*.xls"
openFileDialog1.FilterIndex = 2
Dim fileName As String
If openFileDialog1.ShowDialog() = DialogResult.OK Then
fileName = openFileDialog1.FileName
End If
End Sub
///