Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Working with most recently used colors

Hi. In Excel 2003, I want to build a macro that will add a color to
the CUSTOM or "Recently Used Colors" area in the tools for Fill/Line
Color for autoshapes (not cell fill colors). I want the code to do
this without actually having to use that color first. The code would
contain RGB numbers.

Basically, when I click a custom button on the toolbar it would
emulate having used that color and placed it as the first of 8 colors
in that tool area that shows recently used colors. When I click
another like button but coded with different RGB, it places that color
in the first spot and shifts the others to the right like it normally
does when using colors.

Does anyone have any code for that or ideas? Thanks.

-Melina
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Working with most recently used colors

I never say anything is impossible in Excel but what you ask is going to be
difficult! It does not appear possible even to see what colours are included
in the control yet alone change them. In a new sheet add a shape, format
fill with a custom colour and run the following -

Sub abc()
Dim cb As CommandBar, ctl As CommandBarControl
ActiveSheet.DrawingObjects(1).Select
Set cb = CommandBars("Fill Color")
cb.Visible = True
Set ctl = cb.Controls("Recently Used Colors")
Stop
' look at ctl in locals, press Alt-v, s
End Sub

I can't see anything obvious to work with.

The other approach might be to get the control to change itself. The
"Recently used colours" as applied manually are stored in the Workbook, not
sure where or how. But if you can find that list and change it, I imagine
the control will do what you want.

Regards,
Peter T


"Mel" wrote in message
...
Hi. In Excel 2003, I want to build a macro that will add a color to
the CUSTOM or "Recently Used Colors" area in the tools for Fill/Line
Color for autoshapes (not cell fill colors). I want the code to do
this without actually having to use that color first. The code would
contain RGB numbers.

Basically, when I click a custom button on the toolbar it would
emulate having used that color and placed it as the first of 8 colors
in that tool area that shows recently used colors. When I click
another like button but coded with different RGB, it places that color
in the first spot and shifts the others to the right like it normally
does when using colors.

Does anyone have any code for that or ideas? Thanks.

-Melina



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Working with most recently used colors

It can be done in PPT, so I thought maybe in Excel too?

In PPT it's using ActivePresentation.ExtraColors.Add RGB(125, 68, 25),
but I think I explored ExtraColors in Excel and came up short.

-Melina


On Apr 9, 6:37*am, "Peter T" <peter_t@discussions wrote:
I never say anything is impossible in Excel but what you ask is going to be
difficult! It does not appear possible even to see what colours are included
in the control yet alone change them. In a new sheet add a shape, format
fill with a custom colour and run the following -

Sub abc()
Dim cb As CommandBar, ctl As CommandBarControl
ActiveSheet.DrawingObjects(1).Select
Set cb = CommandBars("Fill Color")
cb.Visible = True
Set ctl = cb.Controls("Recently Used Colors")
Stop
' look at ctl in locals, press Alt-v, s
End Sub

I can't see anything obvious to work with.

The other approach might be to get the control to change itself. The
"Recently used colours" as applied manually are stored in the Workbook, not
sure where or how. But if you can find that list and change it, I imagine
the control will do what you want.

Regards,
Peter T

"Mel" wrote in message

...

Hi. In Excel 2003, I want to build a macro that will add a color to
the CUSTOM or "Recently Used Colors" area in the tools for Fill/Line
Color for autoshapes (not cell fill colors). I want the code to do
this without actually having to use that color first. The code would
contain RGB numbers.


Basically, when I click a custom button on the toolbar it would
emulate having used that color and placed it as the first of 8 colors
in that tool area that shows recently used colors. When I click
another like button but coded with different RGB, it places that color
in the first spot and shifts the others to the right like it normally
does when using colors.


Does anyone have any code for that or ideas? Thanks.


-Melina


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
delete recently used font colors Microdumb New Users to Excel 2 April 29th 23 03:44 AM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
In Excel fill & font colors not working Novusvir Excel Worksheet Functions 2 October 28th 06 08:47 PM


All times are GMT +1. The time now is 12:08 PM.

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"