I'll also note, that the Application.Run("<workbook name>!<public VBA function name>") allows jumps of the execution to other workbooks without changing the ActiveWorkbook property.
I want to know the name of the workbook which hosts the currently executing VBA code.
In case if someone did understand me wrong:
- The trivial
ActiveWorkbookwouldn't do, because the active workbook might be completely different then the one, where the running VBA macro is located. - The
Meobject isn't the ticket either. It contains the reference to the class which method is currently executing, regardless of the hosting object (it would work only if my VBA code is in a method of the Worksheet or Workbook class).