Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Populate a cell with color based on a dropdown lis

    Is there a way to apply to a cell a particular color that is selected from a drop-down list (sort of like the validation list type of drop-down), which still allows the user to enter text in that cell as well? So basically when the user clicks in that cell, he can type whatever he wants, but he also gets a drop-down list where he can pick his colour from to 'pain't his cell... I have a feeling that this is not realy feasable, at least I couldn't come up with a solution on my own...

    Thanks,
    Kislany

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Populate a cell with color based on a dropdown lis

    Let me ask a naive question: doesn't the Fill color dropdown on the Formatting toolbar do what you want? You select a cell (or cells), then select a fill color from the dropdown on the toolbar.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Populate a cell with color based on a dropdown lis

    If the "paint can" as Hans suggested is not what you want, John Walkenbach has a demo of A Color Picker Dialog Box that you could be adapted...

    Steve

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populate a cell with color based on a dropdown

    Thanks a lot for your tips, I will have to look into them, and see if my manager is happy with any of them - I have a feeling that the regular color picker is not what he wants, as he wants to select from a limited number of colors when he clicks on the drop-down, but let's see...

    Thanks again,
    Kislany

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Populate a cell with color based on a dropdown

    If only a limited set is needed, you could also just use a combobox to select the color name and based on the name chosen set it accordingly. Programming would be simpler than the Walkenbach method.

    Steve

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populate a cell with color based on a dropdown lis

    If you can't get what you want with Hans' and Steve's suggestions don't get you what you want, you could also use the worksheet BeforeDoubleClick event routine to display a userform that allows the user to pick the colors from a list that you control.
    Legare Coleman

Posting Permissions

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