Change default fill color of selected cells?

S

Stan

How do I change the default fill color of selected cells, which is normally
very pale?
Office 2007, Win XP Pro
 
P

Pete_UK

I remember reading other posts which say that the background colours
in XL 2007 seem very pale, but as I don't have that version I haven't
paid much attention. Perhaps you can do a Google search to see if any
of the answers proposed in other threads work for you.

Hope this helps.

Pete
 
S

Stan

Thanks, but that means I must do that sequence after I select cells.
What I need is a default (darker) color as cells are selected.
 
R

RobN

Try this code, below, ( right click the sheet and select view code, and
paste it there). You will have to fiddle with the ColorIndex number shown
here as 35 until you get the colour you want. I think the number range goes
to about 50 or so.
You may want to delete this part......
"If Target.Cells.Count > 1 Then Exit Sub" part if it's not what you want,
( this part stops the procedure if more than one cell is selected at one
time.)
You may also want to alter the Range which I've set to A1:Z100

Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim wkArea As Range
Set wkArea = Range("A1:Z100")
If Target.Cells.Count > 1 Then Exit Sub
With wkArea.Interior
.ColorIndex = 0
End With
With ActiveCell.Interior
.ColorIndex = 35
End With
End Sub

Rob
 

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