#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Fill Colour

Is there away to chenge the default fill colour from yellow to a different
colour
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Fill Colour

You would need to change the color pallete. Go to Tools -Options -
Color and select the yellow square then modify it to get the color you
want. You have now lost yellow from the pallete. If you need yellow for
some other purposes, you can modify some other color (perhaps the one
you just replaced yellow with) to be yellow. You can do this in code -
but if it is only 1 or 2 colors you want to change - this works fine.

HTH

-John Coleman

Carrguy wrote:
Is there away to chenge the default fill colour from yellow to a different
colour


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Fill Colour

Another approach which will have the property that it will work with
all workbooks as soon as you open them (and not just the one you first
did the change with) is to put code like this in the workbook open
event of your personal macro workbook:

Private Sub Workbook_Open()
Dim wb As Workbook
For Each wb In Application.Workbooks
wb.Colors(6) = RGB(0, 255, 255) 'the default fill index
wb.Colors(8) = RGB(255, 255, 0) 'now index 8 holds yellow
Next wb
End Sub

This will interchange yellow and a light blue in the color palette. The
problem is - this will do it even in workbooks that you might not want
it to (if they already had some color customization). Run the following
code on a blank worksheet if you want to find what values to use in the
above sub (if you want something other than light blue):

Sub ShowColors()
'Based on fact that
'RGB(R, G, B) & " = " & 65536 * B + 256 * G + R
Dim i As Long, C As Long
Dim R As Long, G As Long, B As Long
Range("A1").Value = "Index"
Range("B1").Value = "Color"
Range("C1").Value = "R"
Range("D1").Value = "G"
Range("E1").Value = "B"
Range("F1").Value = "Check"
For i = 1 To 56
Range("A1").Offset(i, 0).Value = i
Range("B1").Offset(i, 0).Interior.ColorIndex = i
C = Range("B1").Offset(i, 0).Interior.Color
R = C Mod 256
G = ((C - R) Mod 65536) / 256
B = (C - 256 * G - R) / 65536
Range("C1").Offset(i, 0).Value = R
Range("D1").Offset(i, 0).Value = G
Range("E1").Offset(i, 0).Value = B
Range("F1").Offset(i, 0).Interior.Color = RGB(R, G, B)
Next i
End Sub

Think hard before you go this route - it might have unintended
consequences.

HTH

-John Coleman


John Coleman wrote:
You would need to change the color pallete. Go to Tools -Options -
Color and select the yellow square then modify it to get the color you
want. You have now lost yellow from the pallete. If you need yellow for
some other purposes, you can modify some other color (perhaps the one
you just replaced yellow with) to be yellow. You can do this in code -
but if it is only 1 or 2 colors you want to change - this works fine.

HTH

-John Coleman

Carrguy wrote:
Is there away to chenge the default fill colour from yellow to a different
colour


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill colour ko Excel Discussion (Misc queries) 0 June 3rd 08 12:49 AM
can the fill colour of a bar be tied to the data font colour data PaulC Charts and Charting in Excel 0 June 23rd 06 01:21 AM
How to fill colour in Excel, it appers No fill in my computer? bede Excel Discussion (Misc queries) 1 June 11th 05 03:27 AM
Fill colour red Dave Excel Discussion (Misc queries) 2 May 14th 05 12:08 PM
Sum by Fill colour Steve Wood Excel Worksheet Functions 3 December 21st 04 04:50 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"