ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Detect macro's parent workbook or worksheet (https://www.excelbanter.com/excel-programming/296366-detect-macros-parent-workbook-worksheet.html)

Conceptor[_2_]

Detect macro's parent workbook or worksheet
 
Hi all,

I need to know from what particular workbook, worksheet and cell a given macro function is called from. The call could be made from a worksheet.calculate, a user pressing enter in the cell, or any other mean that would trigger the calculation of the formula in the cell

How can I achieve it

Thanks
C.

Frank Kabel

Detect macro's parent workbook or worksheet
 
Hi
not quite sure what you're trying to do but have a look at
application.caller

--
Regards
Frank Kabel
Frankfurt, Germany


Conceptor wrote:
Hi all,

I need to know from what particular workbook, worksheet and cell a
given macro function is called from. The call could be made from a
worksheet.calculate, a user pressing enter in the cell, or any other
mean that would trigger the calculation of the formula in the cell.

How can I achieve it?

Thanks,
C.




All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com