>>>I guess I did not make my question clear. I need a worksheet function that
>>>will behave like the Worksheet.SelectionChange(ByVal Target As Range) function.
>>>This would be analogous to the AfterRowColChange() event of the grid.
>>>
>>>I need the value of a cell to be dynamically updated based on the current excel row
>>>as the user move up and down the spreadsheet.
>>>
>>>> snip
>>
>>Why do you need such a function while there is already one :) Check eventhandler (hope you're using at least VFP6+VFPCOM, better VFP7).
>>Cetin
>
>Thanks for the reply. I need it because we are not allowed to use macros or VBA in our excel files. I think I cannot control this behavior from VFP, it has to be in the excel file itself.
I'm not talking about macros but automation from VFP. Howeever yes even from VFP it's VBA that you should use. I don't know something else Excel exposes to control itself other than VBA. Even if you create an addin dll it'd be VBA code.
If strictly you're not allowed to use VBA I think you can't control it from VFP and any other language,tool including excel itself (unless maybe you use windows messaging, who knows).
Cetin