hi
i think your are a little hung up on thinking that this should be a black
and white issue. not.
see this site.
http://www.mvps.org/dmcritchie/excel/colors.htm
there is no color 0(zero)
there is no color xlnone.
xlnone means(in some cases) revert to defaults. but it is applied to more
that color and interiors.
Range("A1:A10").Font.ColorIndex = xlnone
your msgbox will now say 4.
Range("A1:A10").Linestyle = xlnone
Range("A1").pastespecial Paste:=xlPasteAll, operation = xlnone
and it goes on and on.
understand that many things have more than one word or meaning.
some people call it a pier.
some people call it a warf.
why do we have two words for the same thing?
it is not much different in programming.
why does xlnone have so many meanings?
who know?
the important thing is to learn how to use it in all of its different
meanings.
my thoughts
regards
FSt1
"MichDenis" wrote:
| Because 0 is white. It removes the border though.
Not on my computer...
Try this :
'-----------------------
Sub test()
Range("A1:A10").Interior.ColorIndex = 0
MsgBox Range("A1").Interior.ColorIndex
End Sub
'-----------------------
Or this,
'-----------------------
Sub test1()
Range("A1:A10").Interior.ColorIndex = xknone
MsgBox Range("A1").Interior.ColorIndex
End Sub
'-----------------------
The message is the same : Message = -4142
Thank for your collaboration