Consulting

Results 1 to 5 of 5

Thread: Solved: Changing font color in dropbox

  1. #1

    Solved: Changing font color in dropbox

    I have a drop box with option of colors:

    [VBA]
    cboColorList.AddItem "Aqua"
    cboColorList.AddItem "Blue"
    cboColorList.AddItem "Bright Green"
    cboColorList.AddItem "Dark Green"
    cboColorList.AddItem "Indigo"
    cboColorList.AddItem "Lavender"
    cboColorList.AddItem "Orange"
    cboColorList.AddItem "Red"

    [/VBA]

    I want that every option should be in the color it describes. i.e. Aqua should appear in aqua color. Blue in blue color and so on.

    Is it possible?

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,837
    Location
    Not as far as I know

    What you could do is link the item selection in the drop box to a label.

    In the Label you can then set the BG color to the dropdox selection, just as a example


    So selecting cboColorList.AddItem "Orange" would change the Label's BG to Orange, and you could set the Label Caption to "Orange'

    Paul

  3. #3
    Can't we add an image to combo box? This way I can add a small image with each color option and the image will show color.

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,837
    Location
    I don't think you can add a picture to each line of the List

    No way I know anyway

    Paul

  5. #5
    VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,273
    Location
    Cross-posted at:
    http://www.tek-tips.com/viewthread.c...1643914&page=1

    talhamoin: For cross-posting etiquette, please see: http://www.excelguru.ca/node/7
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •