How do I have a cell highlight when selected?

G

Guest

How do I automatically have a cell highlight when it is selected, regardless
to where the location is in the spreadsheet?
 
G

Guest

Jim,

Thanks for the prompt response, I'm somewhat new at this where do I find and
insert the code in the workbook? Do I insert exactly what is written?

Rhonda
 
C

Carim

Hi Rhonda,

Use the following code :

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Cells.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 6
End Sub

This code is to be inserted into the worksheet module ...
Left click on your worksheet tab
Select view
Paste the above code...
You are all set ...

HTH
Cheers
Carim
 
G

Gord Dibben

Typo patrol.........I found one instead of creating one<g>

Make that.........Right-click on the worksheet tab and paste the code.


Gord Dibben MS Excel MVP
 
C

Carim

Thanks for correcting me ...

How much is the fine charged by the "typo patrol" ... ???

Cheers

Carim
 
G

Guest

I had a similar question. Is there a way to keep each cell highlighted once
they are selected versus this code which only highlights the active cell?

It's helpful when we have data on an Excel worksheet that we are manually
entering into another system to know which cells we have already done.

Thanks.
 
G

Gord Dibben

Fortunately..........nothing.

Otherwise I would be destitute and reduced to Alpo once a day.


Gord
 
G

Guest

Fantastic, it works! I'm like a child at Christmas, thank you soooo much
Carim!

Rhonda
 
G

Guest

Thanks Gord, I did that after I realized that the left did not give me
options, you guys are great, thanks again!

Rhonda
 
G

Guest

I have a similar problem/question. My active cell no longer has a 'box'
around it so I know it's active, how do I get that feature back?

TIA,
Jewelzz
 
G

Guest

This works but how do I make it global rather than for an individual
worksheet? Previous versions of Office always highlighted the selective
active cells, but Office 2007 has it in some kind of barely noticeable
off-white color.
 
G

Guest

Carim said:
Hi Rhonda,

Use the following code :

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Cells.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 6
End Sub

This code is to be inserted into the worksheet module ...
Left click on your worksheet tab
Select view
Paste the above code...
You are all set ...

HTH
Cheers
Carim
 

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