M
Mischa Browne
Hi,
Trying to write a macro to close and check if a workbook is already open and
open sub Show afterwards.
If the workbook is ALREADY open, then it must be closed first - and the
workbook must be re-opened - and the Sub Show must run.
_________
If the workbook is NOT open, then it must be opened - and the Sub
Show must run.
If have tried to do it like below, of course it does not work.
Could one of you Guru's please help me?
*******************************************
Sub Check
If Not ("Book1").Active Then _
Workbooks("Book1").Close SaveChanges:=False
Application.Run ("Book2.xls!Show")
Else Application.Run ("Book2.xls!Show")
End If
End sub
*******************************************
Trying to write a macro to close and check if a workbook is already open and
open sub Show afterwards.
If the workbook is ALREADY open, then it must be closed first - and the
workbook must be re-opened - and the Sub Show must run.
_________
If the workbook is NOT open, then it must be opened - and the Sub
Show must run.
If have tried to do it like below, of course it does not work.
Could one of you Guru's please help me?
*******************************************
Sub Check
If Not ("Book1").Active Then _
Workbooks("Book1").Close SaveChanges:=False
Application.Run ("Book2.xls!Show")
Else Application.Run ("Book2.xls!Show")
End If
End sub
*******************************************