VBE Color Pallet

  • 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.

  • 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:



    Code
    Set myDocument = Worksheets(1)
    With myDocument.Shapes.AddShape(msoShapeRectangle, _
            90, 90, 90, 50).Fill
        .ForeColor.RGB = RGB(128, 0, 0)
        .BackColor.RGB = RGB(170, 170, 170)
        .TwoColorGradient msoGradientHorizontal, 1
    End With
  • Re: Colour Pallett


    Quote

    how 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.

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

  • 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


    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


    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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!