Reputation: 3651
What is the difference between ThisWorkbook
and opened_workbook
?
I only ask because I am looking through some of my old code and I am seeing both being used, I am attempting to clean up some of this code.
As far as I know ThisWorkbook
will always dictate the workbook in which the script is being run in, and opened_workbook
is the workbook that is at the forefront? Am I wrong here?
I'd like to know not only if I'm right or wrong, but where both should be used, because I have a feeling I should be using ThisWorkbook
instead of opened_workbook
in my case.
Thanks in advance for trying to help me understand here.
Upvotes: 0
Views: 271
Reputation: 78
ThisWorkbook is a variable that represents an Application-object.
opened_workbook must be a variable.
Upvotes: 2