P
plc
I am trying to set the background color of a text box with conditional
formatting.
I tried conditional formatting from the format menu but three colors isn't
enough.
I tried assigning a color coding function to the BackColor property but the
builder only accepts colors from the color chart and rejects all other
functions.
Same holds for the conditional formatting color.
I also tried setting the BackColor property in the BeforeUpdate and
AfterUpdate event procedures with no success.
Clippy says "You can set conditional formatting based on the value in a
control, an arbitrary expression referencing another control, a user-defined
Visual Basic for Applications function, or the control with focus. You can
change the color of the text, make the text bold, italic, or underlined, or
enable or disable a control when it meets or doesn't meet criteria you
specify."
Just how do you do that with a user-defined Visual Basic for Applications
function ? I'm tired of wasting my time on trial and error.
Does anyone know which event procedure will apply conditional formatting ?
I would appreciate an example assigning the following function's result to
the BackColor property
Public Function ColorCode(A as variant) As LongInteger
Thanks in advance
formatting.
I tried conditional formatting from the format menu but three colors isn't
enough.
I tried assigning a color coding function to the BackColor property but the
builder only accepts colors from the color chart and rejects all other
functions.
Same holds for the conditional formatting color.
I also tried setting the BackColor property in the BeforeUpdate and
AfterUpdate event procedures with no success.
Clippy says "You can set conditional formatting based on the value in a
control, an arbitrary expression referencing another control, a user-defined
Visual Basic for Applications function, or the control with focus. You can
change the color of the text, make the text bold, italic, or underlined, or
enable or disable a control when it meets or doesn't meet criteria you
specify."
Just how do you do that with a user-defined Visual Basic for Applications
function ? I'm tired of wasting my time on trial and error.
Does anyone know which event procedure will apply conditional formatting ?
I would appreciate an example assigning the following function's result to
the BackColor property
Public Function ColorCode(A as variant) As LongInteger
Thanks in advance