dhancy
Board Regular
- Joined
- Jul 10, 2013
- Messages
- 123
- Office Version
- 365
- Platform
- Windows
In Excel VBA, I can run this code:
I now want to expand on that to refer to a sheet on another open workbook.
I found this syntax online:
If Sheet1 exists, it returns true.
If Sheet1 does not exist, I get "Error 2015".
Shouldn't it return False in that case? Perhaps there is different syntax I should use? Can you help? Thanks!
Dennis
Code:
if evaluate("ISREF('Sheet1'!A1)") then
I now want to expand on that to refer to a sheet on another open workbook.
I found this syntax online:
Code:
if evaluate("ISREF('[MyFile.xlsm]Sheet1'!A1)") then
If Sheet1 exists, it returns true.
If Sheet1 does not exist, I get "Error 2015".
Shouldn't it return False in that case? Perhaps there is different syntax I should use? Can you help? Thanks!
Dennis