A user defined function cannot change other cells in the workbook.
You might want to hook the Calculate event or onchange for the reference
cell.
--
Rob van Gelder -
http://www.vangelder.co.nz/excel
"Sunnous" wrote in message
...
Hi,
I would be grateful if someone could help me with the problem have got.
I have written a macro, with my user defined functions. One of my user
defined functions is called GetData and it has two parameters Reference
and
Last_Value, eg GetData(Reference, Last_Value).
I call GetData by assigning this to a cell like so (which works fine):
Cell.Formula = GetData(Reference, Last_Value)
Now within the GetData function I use the Reference Parameter to get a New
Value, which will be returned to the cell (which works fine too). But
what I
wanted to know is how can I change the Last_Value Parameter to the new
Value
I have, which also change Last_Value which is assigned to cell while I'm
still in the GetData function.
Thanks
Sunnous