Active Cell problem
And you're calling the function from a formula in a worksheet cell?
If yes, look at Application.caller
Option Explicit
Function myFunc() As String
myFunc = Application.Caller.Address(external:=True)
End Function
"Bruce A. Julseth" wrote:
I have a VBA function that is located in several Cells
[=myFunction(dataRange as Range)]. For the function to work during Excel
Recalculation process, I need to now the address that Excel is
recalculating. Say the formula is located in the 12 Cells, A1:B6. As Excel
works through the recalculation, my function needs the know the cell (A1:B6)
Excel is recalculating.
I tried
Set HomeCell = Range(ActiveCell.Address)
With this, I only get the cell where the cursor is located at the time Excel
starts the recalculation.
Thanks for the help
--
Dave Peterson
|