Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

SelectionChange event executes whenever the user makes a new selection on the worksheet

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)     Cells.Interior.ColorIndex = xlNone     With ActiveCell         .EntireRow.Interior.ColorIndex = 36         .EntireColumn.Interior.ColorIndex = 36     End With End Sub