color palette Question

excelsishya

Board Regular
Joined
Jul 25, 2010
Messages
107
Hi all,

I have few colour (4) whose RGB i know.

I would like these color to show both in fill dialog box and border line dialog box along with standard colors each time i open excel(permanently).

Any ideas how to do it.

Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi excelsishya,

You could create a custom Theme using those RGB colors.

Then you can set that theme as your default for new workbooks.

For your existing workbooks, or workbooks created by others, you could set your custom Theme as the current theme after opening the workbook.

Explanations are included in xl2007 Help under topics:
  • Customize the theme colors
  • Create the default template from an existing workbook
 
Upvote 0
Have you looked at the Colors property of the Workbook?

This will turn yellow into red
Code:
ThisWorbook.Colors(6) = RGB(255, 0, 0)
 
Upvote 0
Jerry and mike thanks for reply.

Jerry i tried method you suggested.

Based on excel help whatever i can understand
pagelayout-color-create new theme color and selected my rgb and theme color gave name.

when i opened fill dialog box color was there.But it seems its only available in that work book. when i open new book it disappears. how to import new book.

Can,t we make it appear all the time wen we open new book or do we need to import color every time.i am unable to import it.Could you please suggest steps.


Mike i am not good with VBA .Does the code you gave will make color appear permanently in work book (fill dialog box).

i tried with this code


Sub coloretheme()
ThisWorbook.Colors(6) = RGB(75, 198, 177)
End Sub

got error in 2nd line . may be way i executed was wrong.

Thanks again for help.
 
Upvote 0
when i opened fill dialog box color was there.But it seems its only available in that work book. when i open new book it disappears. how to import new book.

Can,t we make it appear all the time wen we open new book or do we need to import color every time.i am unable to import it.Could you please suggest steps.

When you create a new theme on your computer, it should save it to an .xml file in the folder:
C:\Documents and Settings\YourUserName\Application Data\Microsoft\Templates\Document Themes\Theme Colors\

This makes the Theme Colors easily available to you..
In the Ribbon click: Page Layout > Themes > Colors
You should see 2 sections of Themes: Custom and Built-In. Your new Theme should be in listed under Custom. If you click on the name it will become the current Theme in that workbook.

This process doesn't automatically make your Theme your Default as it sounds like you are asking. One way to do that for New Workbooks, is to make your Theme the current Theme in your Default Workbook and Worksheet. Instructions are in the second help article I listed, titled: "Create the default template from an existing workbook"

This will solve the problem for any new files you create, but you will need to do the steps described above (select your Custom Theme from the Ribbon) for any existing files you have or any workbooks you recieve from others.

You could use VBA to automatically do this...but based on your last post, you might want to try doing all the other steps without the VBA and see that is convenient enough for you.
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,408
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top