• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Active cells stays highlighted

Hi Ppls,

i am trying to highlight my activecell with skyblue color for the same i used event
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
and it is working fine as i have instructed it and the i am unable to instruct is to reset its color while leaving cells as it is that is no fill.

attached file with sheet mine contains code. What i am missing in instruction please tell me?

many thanks in advance
 

Attachments

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Clear previous formatting
Cells.Interior.ColorIndex = xlNone
'Set new format
ActiveCell.Interior.ColorIndex = 37
End Sub
 
Back
Top