View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Change the properties of a non selected cell?

just refer to the cells

target.offset(0,1).Interior.ColorIndex = 5

or

cells(Target.row,"F").Interior.ColorIndex = 5

as examples.

--
Regards,
Tom Ogilvy

"Winshent" wrote in message
om...
i have some code which validates a row.. and compares two columns in
the row. The code is triggered from Worksheet_SelectionChange(ByVal
Target As Range) within the worksheet.

i want to be able to set the colours of the cells if they do not pass
validation.. how can i do this with selecting the actual cell?

Thanks

Vincent