Userform Label Click
if you want each click to do something different, then yes.
if you want them to do all the basic same thing, then yes, but smaller
- you could have it coded like this:
sub label1_click()
myVariable = label1.caption
call Heres_The_Real_Work
end sub
sub label2_click()
myVariable = label2.caption
call Heres_The_Real_Work
end sub
sub label3_click()
myVariable = label3.caption
call Heres_The_Real_Work
end sub
then have one sub
sub Heres_The_Real_Work()
'whatever you want it to do each time a label is clicked
end sub
hth
susan
On Jun 25, 12:03 pm, Zone wrote:
I have 30 labels on my userform. For each label that's clicked, I
want to remember the name of the label and then run a subroutine. All
of them run the same sub, and that sub does different things depending
on the name of the label. Do I have to have to have 30 different
click event subs for the 30 different labels?
TIA, James
|