how do you make the cursor position have a color ?

G

Guest

I am trying to be able to locate when my cursor is located in a spradsheet
easier by coloring the highlighted cell it is at. How do I accomplish this?
 
G

Gord Dibben

You would need VBA code to produce this.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
Cells.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 6
Oldrow = Target.Row
ws_exit:
Application.EnableEvents = True
End Sub

Thsi is woeksheet event code.

Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Colorindex 6 is yellow.

To see the rest of the colors and numbers see David McRitchie's site.

http://www.mvps.org/dmcritchie/excel/colors.htm


Gord Dibben MS Excel MVP


On Fri, 22 Sep 2006 10:30:02 -0700, Erin Nordan <Erin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top