LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How I can get color (RGB value) from .ThemeColor + .TintAndShade?

Hello,
I want to create a form with button. The button must be coloured in one from
color theme Excel_2007.
I can get base color theme (10 color: XlThemeColor):

Dim Color (1 To 10) As Integer
Dim Scheme As ThemeColorScheme
Set Scheme = ActiveWorkbook.Theme.ThemeColorScheme
For Color = 1 To 10
X(Color) = Scheme(Color).RGB
Next
Set Scheme= Nothing
'and
MyForm.MyButton.BackColor=X(3) '(for example)

X -array that have 10 color active theme.

But I need to define more colors in palette (50 derivative of base colors).
If I deal with cell that I can use:

Range("A1").Select
With Selection.Interior
.ThemeColor=xlThemeColorAccent1 '(for example)
.TintAndShade = 0.8 '(take on a value from 1 to -1). We to define
any from derivative of base colors
End With

But Button have not ".TintAndShade" property! May be if I know X and
TintAndShade value, can I to calculate result color?

P.S. I can be coloured cells in 60 color. Then I can to recognize RGB for
each cell and give it to button. But it not correctly way.


 
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
themecolor, colorindex, color picker Sindi Excel Programming 0 October 22nd 07 07:55 PM
Excel 2007, ThemeColor Light and Dark reversed Chris John Excel Programming 7 September 7th 07 03:58 AM
change fill color of a range of cells based on color of a cell? DarMelNel Excel Programming 0 March 2nd 06 06:35 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 12:09 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"