Dim o As New OpenFileDialog With {.Filter = "Exe|*.exe;*.dll"} If o.ShowDialog = Windows.Forms.DialogResult.OK Then f = o.FileName End If