error on a macro
Hi
Sub OpenWorkbok()
Dim fName As String
fName = Application.GetOpenFilename()
If fname < "" Then
Workbooks.Open Filename:=fName
End If
End Sub
--
Regards
Roger Govier
"Exceldude" wrote in message
...
I have created this macro to open an excel file; but if a file is not
selected
than end up in error, is there a way to stop the macro without an error
this is what i have
Sub OpenWorkbok()
Dim fName As String
fName = Application.GetOpenFilename()
Workbooks.Open Filename:=fName
End Sub
|