More...
You do not have to activate a workbook in order to run code.
"Workbooks(2).Sheets(3).Range("A1").value2 = 1234" runs just fine without activating/selecting that
workbook.
If you do have to determine if the workbook with code is active then...
"ActiveSheet.Parent Is ThisWorkbook" returns True or False.
'---
Jim Cone
"Jim Cone"
wrote in message
...
The active sheet is always in the active workbook.
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(List Files XL add-in: finds and lists files/folders with hyperlinks)
"Charlotte E."
wrote in message
...
Is there a way to check if ActiveSheet is part of the workbook in which the a macro is located?
I have a macro which switches between 3 open workbooks, and for some reason the activesheet also
switches...
How to check if ActiveSheet is in ThisWorkbook or in ActiveWorkbook?
Thanks,
CE