[color=blue]Private Sub[/color] SomeSub()
[color=blue] Dim[/color] od [color=blue]As New[/color] OpenFileDialog
[color=blue]With[/color] od
.Filter = "Applications (*.exe)|*.exe"
[color=blue]End With[/color]
[color=blue]If[/color] od.ShowDialog = DialogResult.OK [color=blue]Then[/color]
System.Diagnostics.Process.Start(od.FileName) [color=green]'/// od.FileName being the path of the .exe[/color]
[color=blue]End If[/color]
[color=blue]End Sub[/color]
dynamic_sysop said:use System.Diagnostics.Process.Start
eg:
Code:[color=blue]Private Sub[/color] SomeSub() [color=blue] Dim[/color] od [color=blue]As New[/color] OpenFileDialog [color=blue]With[/color] od .Filter = "Applications (*.exe)|*.exe" [color=blue]End With[/color] [color=blue]If[/color] od.ShowDialog = DialogResult.OK [color=blue]Then[/color] System.Diagnostics.Process.Start(od.FileName) [color=green]'/// od.FileName being the path of the .exe[/color] [color=blue]End If[/color] [color=blue]End Sub[/color]
rot13 said:Why do you use With/End With for .Filter?
thanks
Gooley said:Yeah, it seems like a waste..