Open window - on error
Sub Opendefactivewkbk()
On Error GoTo ErrorTrap1
ChDrive ActiveWorkbook.Path
ChDir ActiveWorkbook.Path
FName = Application.GetOpenFilename()
ErrorTrap1:
ChDrive "D"
FName = Application.GetOpenFilename()
If FName < False Then Workbooks.Open FName
End Sub
The above macro works well without the on error - however i need it in
case i want to open a file from an active workbook which has not yet
been saved.
My problem is that I have 2 open window appearing one after the other
if there is no error.
an anybody correct my code pls
thxs
|