I want to make a Continous Form Color Swatch of all Hex colours

  • Thread starter Thread starter efandango
  • Start date Start date
E

efandango

I want to make a Continous Form Color Swatch of all Hex colours in a similar
style to a hardware store Paint Chart; in a 1 column format, like this:

Hex code text box/other control
B4B4EE actual color box
6363EE actual color box
and so on...

I have all the data, but need to know how to make the text box background
respond to each individual hex code, can it be done?
 
Sorry,

I should have explained more cleary, I am using a continous form and that
the problem is that I can't get each individual text box to be a different
colour on this form.
 
That's right, you can't.

Even using Conditional Formatting, you won't be able to get as many colours
as you're trying to get.
 
Douglas,

thanks for the clarification; i feared the worse... do you think there may
be a way of doing it with another object, such as a rectangle or perhaps a
3rd party element?

or am I just plain snookered?
 
efandango said:
I want to make a Continous Form Color Swatch of all Hex colours in a similar
style to a hardware store Paint Chart; in a 1 column format, like this:

Hex code text box/other control
B4B4EE actual color box
6363EE actual color box
and so on...

I have all the data, but need to know how to make the text box background
respond to each individual hex code, can it be done?


Don't you just hate it when "it can't be done" :-)

You have to be up for some serious trickery and it will
require some significant thought and probably advanced VBA
coding for you to adapt it to your scenario, but Google
Groups for:
More than three conditional make-up criteria
author:marshall author:barton

If you have a lot of colors, it might be too slow to be
useful.

Don't forget that there is a 754 limit on the number of
controls on a form. This technique requires 1+Colors/3 text
boxes for each one you want display so you may run out
pretty quickly. Be sure to check VBA Help for the:
FormatConditions Property
so you can assign the Hex values to the conditions.
 
There might be third-party controls you can use, but I'm afraid I don't know
of any.

The issue with a continuous form is that while it may look as though you've
got, say, 30 text boxes (or 30 rectangles) on the form, you've really only
got one text box (or rectangle) repeated 30 times. That means that when you
change a property such as BackColor, you're changing it for all instances of
the control.
 
Back
Top