View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default changing cell values from within UDF

Benny,

A UDF can only return a result, it cannot change properties of a worksheet
or cells. The result will show in the cell that the UDF is called in but
that is it.

If you want to set colour, you could use conditional formatting based upon
the value in a cell.

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
oups.com...
I made a UDF (so residing in a function module) and want to change the
value of a cell on "sheet1" but this doesn't work. I can read the value
but not set it. Like it was read-only. It doesn't seem to work with
other properties (e.g. colour) to

Regards
Benny