Gates Is Antichrist
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 1,961
Yeah, I know that ActiveWorkbook.Name is the current workbook. Instead, what I'd like is to know the name of the workbook that the currently running code exists in. You know, the one in the Windows Title bar of the VBE (code) window?
That may be different than ActiveWorkbook, either because either the active workbook has changed since starting the code, or the code was invoked from another workbook in the first place. Consider running a sub that's in PERSONAL.xls - that's invoked while FOO.XLS is active. If it's always hidden, heck yeah it would not be .ActiveWorkBook. So my objective is: is there then a variable whose content is "PERSONAL.XLS" ?
Is there an "Owner of the VBE" variable?
That may be different than ActiveWorkbook, either because either the active workbook has changed since starting the code, or the code was invoked from another workbook in the first place. Consider running a sub that's in PERSONAL.xls - that's invoked while FOO.XLS is active. If it's always hidden, heck yeah it would not be .ActiveWorkBook. So my objective is: is there then a variable whose content is "PERSONAL.XLS" ?
Is there an "Owner of the VBE" variable?