• 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

  • SAMPLE.xlsm
    13.6 KB · Views: 6
Hi Gaurav,

See the file, it uses CF and macro, if this suits your requirement than increase the CF range.

Regards,
 

Attachments

  • SAMPLE (2).xlsm
    15.1 KB · Views: 3
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