George J
Well-known Member
- Joined
- Feb 15, 2002
- Messages
- 959
I have a workbook that creates another workbook on opening using
I have this as a Public Variable.
If I close the Freshwkbk workbook, when code is run on the original workbook I am unable to tell that the Freshwkbk has been closed. If I put
in the immediate window (after closing the Freshwkbk), it returns False.
If I put ?Freshwkbk.name in the immediate window, I get an "Automation error" stating "Run-time error '-2147221080 (800401a8)'.
I thought that checking
that this would tell me if the workbook was available. Should I be using something else to test for this?
Code:
Set Freshwkbk = Workbooks.Add
If I close the Freshwkbk workbook, when code is run on the original workbook I am unable to tell that the Freshwkbk has been closed. If I put
Code:
?Freshwkbk is nothing
If I put ?Freshwkbk.name in the immediate window, I get an "Automation error" stating "Run-time error '-2147221080 (800401a8)'.
I thought that checking
Code:
If Freshwkbk is Nothing