I have a worksheet that contains User Defined Function calls in the
cells. At the time you open the sheet, the function is called and
populates the value for the cell. I am trying to determine the current
cell. When I walk through this in debug mode, it says the active column
is the last column that was active when the sheet was saved. It doesn't
refer to the current cell that has called the user defined function.
How can I determine what the cell that the user defined function is
currently updating?

My cell contains the following function:
=wbGetLastCompletedSampleDate("123","abc",QueryDates!B8,QueryDates!B9)
When it runs the function, I need to set 2 custom document properties
for the cell that contain QueryDates!B8 & QeuryDates!B9. Whenever I
look at the activecell within the function WbGetLastCompletedSampleDate
(in runtime) it always returns the same value.

I appreciate any feedback on this issue.

Thanks.