Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I'm stuck, is there any way to change the color a palette index references from VBA. for example I want to change the color that colorindex(3) references from blue to green, that way all my cells that reference colorindex(3) change from blue to green. can I do this in VBA? thanks a lot b |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is a workbook-level setting. Did you try recording a macro?
Something like: ActiveWorkbook.Colors(3) = RGB(0, 128, 0) should work. -- Vasant "brad" wrote in message om... Hi all, I'm stuck, is there any way to change the color a palette index references from VBA. for example I want to change the color that colorindex(3) references from blue to green, that way all my cells that reference colorindex(3) change from blue to green. can I do this in VBA? thanks a lot b |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Vasant is correct. This is what I insert in one of my modules, for example, in some of my workbooks. You record with the macro to get the precise RGB (red-green-blue) numbers that you want. Sub Auto_Open() With ActiveWorkbook .Colors(2) = RGB(233, 230, 254) .Colors(11) = RGB(232, 254, 243) .Colors(15) = RGB(255, 204, 255) .Colors(16) = RGB(251, 223, 255) .Colors(19) = RGB(255, 255, 195) .Colors(34) = RGB(195, 255, 255) .Colors(35) = RGB(195, 255, 195) .Colors(47) = RGB(227, 252, 255) .Colors(48) = RGB(228, 225, 224) .Colors(49) = RGB(252, 255, 227) .Colors(55) = RGB(255, 248, 227) .Colors(56) = RGB(227, 255, 245) End With End Sub Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Color Palette | Excel Worksheet Functions | |||
Changing the Excel color palette | New Users to Excel | |||
Changing color palette for Excel 2002 | Excel Discussion (Misc queries) | |||
Changing color in color palette | Setting up and Configuration of Excel | |||
Programmatically changing cell color | Excel Programming |