ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need to know what cell called the custom VBA function? (https://www.excelbanter.com/excel-programming/340490-need-know-what-cell-called-custom-vba-function.html)

partyOfOne

Need to know what cell called the custom VBA function?
 
I have developed a custom VBA function (foo). In a cell on the worksheet, I
add
=Foo() . When Foo begins to run, I want to know what is the activeCell.

Gary''s Student

Need to know what cell called the custom VBA function?
 
If you mean from which cell the function was called:

Dim r as Range
set r = Application.Caller

--
Gary''s Student


"partyOfOne" wrote:

I have developed a custom VBA function (foo). In a cell on the worksheet, I
add
=Foo() . When Foo begins to run, I want to know what is the activeCell.



All times are GMT +1. The time now is 05:23 PM.

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