View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark[_46_] Mark[_46_] is offline
external usenet poster
 
Posts: 2
Default Referencing "current" row (not using ActiveCell.Row)

This must be easy, but I'm being a bit stupid here as I can't find the
method that I'm after.

I have a custom volatile function that I want to return the row in which the
function is used - not the active row. (Actually, it does a lot more, but
this is the crux of the problem.)

So:

Function GetRow()
Application.Volatile (True)
GetRow = Application.ActiveCell.Row
End Function

doesn't work because if I click away from the cell that uses the function,
the cell then gets the value of the active cell and not the one in which the
function is used. After much searching on MS and Google, I admit that I'm
stumped. :-|

Any ideas?

TIA
MArk