Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I try to change the color of cell from a function called from that cell, the change never takes place.
function SetMyColor (colorindex) Application.Caller.Interior.ColorIndex = colorindex 'this line never works If Application.Caller.Interior.ColorIndex = xlNone Then SetMyColor = "None" Else SetMyColor = Application.Caller.Interior.ColorIndex End If end function I've tried any number of variations, including hardcoding the range, for example: Range("J4").interior.ColorIndex = 17 and the color is never changed. I can change the color from a stand-along macro, just not from a function. If I change the color manually, the function will return the colorIndex successfully. Is this symptom part of a general issue of changing cells from within functions they call? Is there a way around it? Thanks! ---Wayne Erfling |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I know which cell a function is called from? | Excel Worksheet Functions | |||
From which cell is my VBA function called ? | Excel Programming | |||
Need to know what cell called the custom VBA function? | Excel Programming | |||
Excel VBA-Changing cell color with if then function | Excel Programming | |||
How do I find which cell called a function? | Excel Programming |