#Value! error when using ActiveCell.Interior.Color

M

Matt

I have a function;

Function MyColor()
ActiveCell.Interior.Color = RGB(255, 0, 0)
End Function

When a call the function from a cell [=myColor()] it returns a #Value!
error. and does not changed the color. If I then click 'show calculation
steps' the color changes but the error remains.

This seems to be happening for any function that tries to modify the cell
properties . I am using Excel 2007.
 
B

Bob Phillips

You cannot change a cell from within a function called from a worksheet.


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top