How do i change the color of a cell when tabbing?

  • Thread starter Thread starter Lisa Z
  • Start date Start date
L

Lisa Z

How do i change the color of a cell when tabbing so it's easier to move
around spreadsheet knowing where the cursor is located?
 
Copy the code below to a given worksheet codemodule. Once you do it
and save the excel workbook, on that particular sheet you would see
the cell graying out when you tab or move between range or cells.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim mySht As Worksheet
Set mySht = Target.Parent
mySht.Cells.Interior.ColorIndex = 0
Target.Interior.ColorIndex = 15
End Sub

I hope this helps...

Selva V Pasupathy
For more on Excel, VBA, & other Resources
Please visit: http://socko.wordpress.com
 
Back
Top