MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

userform listbox colors

  Asked By: Everett    Date: Jan 13    Category: MS Office    Views: 2779

I have benefited much from reading the postings on this group
(thanks to all of you!), so from now on, I'll toss my ideas in as
well for whatever they are worth, in hopes to help others as you
have all helped me.

But, at the moment, I haven't been able to find anything on
whether I can highlight specific lines in a userform listbox.

The macro I am working on is for a 911 center, and for the most
part is simply sorting the data into the relevant categories, which
is going fine. On the spreadsheet, the lines which have gone past
certain criteria are highlighted so the user can locate them easily
(e.g. if a call goes past 45 seconds without a dispatch response,
then a supervisor must review the tape of the call). There are 3
types of potential problem lines, which I have identified in
column "A", as "PS", "PT" and "Both" respectfully. I have
arbitarily used a "yellow" background for the "PS" type
errors, "blue" for the "PT" type, and "green" for the "both"
category. On the spreadsheet, that's no problem at all, easily done
in VBA (that is, thanks to the help from all of you).

My question is relevant to the userform I am setting up for a
supervisor to make comments in response to the specific problem--
this being prompted by some of the supervisors being not as computer-
wise as others. Is there a way for me to make the lines which
contain a potential problem line highlighted in a listbox, just as I
have on the spreadsheet? Otherwise, I think I have it set up ok so

Is this possible?



2 Answers Found

Answer #1    Answered By: Reamonn Fischer     Answered On: Jan 13

AFAIK It is not possible to colour the lines in a list box different
colours. A workaround may be to have those lines selected so they are sort
of highlighted. Another solution, though not what you were looking for is to
use a listbox  in which selection is possible by putting a Tick in a
selection box.

Answer #2    Answered By: Aaron Evans     Answered On: Jan 13

As it turns out, your reply matched exactly what I had already
done, so it's good to know that I was on the right track. The
details are that I have a button labelled "Next Error" which locates
the next line in the list box which has a potential problem which
needs to be evaluated by a supervisor, which is the same idea as
putting a 'tick' in a selection box. I should have said that
before, so your reply is on target, indeed, thank you.
And, it is also good to know that the listbox  lines are limited
in that way . . . I had thought I might be missing something, but
apparently that is not the case (for once, <grin>).
Have a wonderful Thanksgiving Day, if you are in the US,
otherwise, have a wonderful day wherever you are.

Didn't find what you were looking for? Find more on userform listbox colors Or get search suggestion and latest updates.