Does anyone know how to show the full colour pallett in the VBE toolbox so that I can have different colours than the standard provided for textboxes and lables.
VBE Color Pallet
-
-
-
Re: Colour Pallett
I have not used it myself, so I cannot offer any experience, but I think you'll want to play with the RGB settings. I don't know if you can actually display the continuem pallett.
This is from VBA Help:
QuoteColorFormat Object
See AlsoPropertiesMethodsEventsSpecificsMultiple objects
ColorFormatRepresents the color of a one-color object, the foreground or background color of an object with a gradient or patterned fill, or the pointer color. You can set colors to an explicit red-green-blue value (by using the RGB property) or to a color in the color scheme (by using the SchemeColor property).
Using the ColorFormat Object
Use one of the properties listed in the following table to return a ColorFormat object.Use this property With this object To return a ColorFormat object that represents this
BackColor FillFormat The background fill color (used in a shaded or patterned fill)
ForeColor FillFormat The foreground fill color (or simply the fill color for a solid fill)
BackColor LineFormat The background line color (used in a patterned line)
ForeColor LineFormat The foreground line color (or just the line color for a solid line)
ForeColor ShadowFormat The shadow color
ExtrusionColor ThreeDFormat The color of the sides of an extruded objectUse the RGB property to set a color to an explicit red-green-blue value. The following example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.
-
Re: Colour Pallett
Quotehow to show the full colour pallet in the VBE
We're talking Userforms, right?I don't think you can. You can set the RGB color explicitly in the Properties window.
-
Re: VBE Color Pallett
QuoteDoes anyone know how to show the full colour pallett in the VBE toolbox so
How does one show a part color pallet in the VBE toolbox?
-
Re: VBE Color Pallet
I was just wondering if there was a way of using the regular pallet that is available in Excel when building a userform, or an addin that was available for this purpose?
-
-
Re: VBE Color Pallet
Thanks dave I will give it a go.
-
Re: VBE Color Pallet
Are userform colors (once suitably modified in the Properties window in the VBE) also restricted to the 56 color pallet of the workbook in which they reside? Anyone know?
-
Re: VBE Color Pallet
No Richard. All colors are available. I think the OP wants a customized color? Select your userform, and for instance, the backcolor property. Click the dropdown, select the Pallete tab and right click on any of the squares that are reserved for creating custom colors. This would be the last two rows which will all be white if you have not defined any custom colors. There are 48 predefined colors and room enough to save 16 additional custom colors. You can create any color your system will support for your userforms and controls.
-
Re: VBE Color Pallet
Ah thanks Tom - that's useful to know.
Richard
-
Re: VBE Color Pallet
This thread bit my curiosity bump. So...the attachment is a utility that uses the Edit Color Palette to set userform control colors at design time.
The userform in question can be in any open workbook.The utility is a userform built around this GetColorValue function.
Code
Display MoreFunction GetCustomColorValue(Optional startingColor As Variant) As Double Dim colorMemory As Double colorMemory = ThisWorkbook.Colors(3) If IsMissing(startingColor) Then startingColor = colorMemory ThisWorkbook.Colors(3) = startingColor If Application.Dialogs(xlDialogEditColor).Show(3) Then GetCustomColorValue = ThisWorkbook.Colors(3) Else GetCustomColorValue = -1:Rem cancel pressed End If ThisWorkbook.Colors(3) = colorMemory End Function
-
Re: VBE Color Pallet
nifty stuff Dude
You have truly scratched your curiosity bump
I have another example to add to the mikerickson files
pike
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!