Or if you wanted to keep labels so that the controls can't be clicked into
and receive the focus (giving the game away of how you achieved your look)
then you could write one function with an argument that determines the bar
that clicked it.
e.g. fActionBar(intBar as integer) and call that directly in the click
event.
i.e. =fActionBar(1), =fActionBar(2) etc etc
(If altering the passed integer for each of the 75 labels seems daunting
then you could write some code to loop through them and enter the function
accordingly - this would require your labels to have a consistent naming
convention of course - but in a situation as you describe I'd imagine you'd
have to do that anyway).
hth
--
---------------------------------------------------------------
Mr Leigh Purvis - Proprietor
Database Development
---------------------------------------------------------------
Email:
Le***@DatabaseDevelopment.co.uk
Web:
www.DatabaseDevelopment.co.uk
Mobile: 07713 166938
---------------------------------------------------------------
"Hank" <ha********@aol.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
On one of my forms I display a histogram representing the status
of jobs in our factory. It's configured as a stacked bar which I
create using labels of different background colors. 75 labels are
arranged in, up to, 15 vertical bars representing different customers.
When the user clicks on one of the labels I display a list box with
details about the data in the bar.
I only want to know which stack and which bar was clicked so I can
display the related data. It is easy enough to create 75 event
handlers to deal with each possible click but I would hope that there
is a more elegant way to handle this. I wanted to use Active Control
to get the name of the Label that was clicked but Active Control is a
Property and not an event. So I need an event that sends me to the
function that will use Active Control to determine the name of the
clicked label and send me to the function that explodes the data.
Thanks,
Hank Reed