Example on using the open file dialog to display the Filename in a MsgBox
Single File Minimum:
Dim ofd As OpenFileDialog = New OpenFileDialog
If ofd.ShowDialog() <> DialogResult.Cancel Then
MsgBox(ofd.FileName)
End If
Single File Advanced:
Dim ofd As OpenFileDialog = New OpenFileDialog
With odf
.DefaultExt = "txt"
.FileName = "defaultname"
.InitialDirectory = "c:\"
.Filter ="All files|*.*|Text files|*.txt"
.Title = "Select file"
End With
If ofd.ShowDialog() <> DialogResult.Cancel Then
MsgBox(ofd.FileName)
End If