Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

how do you make the cursor position have a color ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Erin Nordan - 22 Sep 2006 18:30 GMT
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?
Gord Dibben - 22 Sep 2006 20:15 GMT
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

>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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.