I try to create a custom function for checking cell background color.
Function ColorCheck()
Dim v
oActiveSheet = ThisComponent.getCurrentController().getActiveSheet()
v=oActiveSheet.getCellByPosition( 0, 0)
if vartype(v) = 9 then
ColorCheck = v.CellBackColor
else
if v.CellBackColor = 2302940 then
ColorCheck = "TRUE"
endif
End Function
It basically works when I use “=ColorCheck()”, but if I update the background of the referenced cell the value does not change until I recreate my function entry. I tried recalculating function but I does not work too.
How can I get this to auto update the value if I change the Color ?