How to discovery the color...
for the Font:
Dim r as Range
set r = range(A1)
If r.Font.ColorIndex = 3 then
Msgbox red
End if
if the cell background is red:
Dim r as Range
set r = range(A1)
If r.Interior.ColorIndex = 3 then
Msgbox red
End if
--
regards,
Tom Ogilvy
"Lisandro Oliveira" wrote:
How can I know what is the color of the value of variable?
Example:
Cell A1 = test (its in red)
VBA:
Dim var as string
Var = range(A1).value
If var.Interior.ColorIndex = red then
Msgbox red
End if
Tks,
Lisandro
|