Re: Help with events

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



No, Font isn't a child of Interior. You would have to set it up slightly
differently

With Rows([ThisRow])
.Font.ColorIndex = 1
With .Interior
.ColorIndex = 46
.Pattern = xlSolid
End With
End With

if you wanted to still use With.

--
Regards,
Tom Ogilvy




"A1pro" <A1pro@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8BC4E2D8-8C1F-4E5F-AFDC-D4A471507CC5@xxxxxxxxxxxxxxxx
Thanks that works great

in order to change the font colour of the whole row I've had to add

With Rows([ThisRow]).Interior
.ColorIndex = 46
.Pattern = xlSolid
End With

Rows([ThisRow]).Font.ColorIndex = 1 ' ensures that font is black

as adding .font.colorindex = 1 or .font.color = 1 to the With statement
would not work.

any ideas why?

The way I do it works, but it just doesn't seem too elegant

Thanks for your time anyway


.



Relevant Pages