View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Text labels on a Userform

Hi,

Depending on you layout of labels you could either,

random layout, create a class to handle the click event of many labels.
John's example should help explain the principle.
http://spreadsheetpage.com/index.php...er_dialog_box/

ordered layout, place a transparent label over the top of the other
labels and capture the click in that 1 label.

Cheers
Andy

Robert Crandal wrote:
For my userform, I am handling "UserForm_Click()" to detect
when someone clicks on the form. The problem is, my
Userform contains about 20 individual "text label" controls
which sit on top of the form. Therefore, UserForm_Click()
only gets called someone clicks an area that is not covered
by a text label....

Is there an easy way to detect if someone clicks on ANY
area of the userform?? I fear that I might have to handle
20 individual "Label_Click()" functions in addition to
the UserforClick() function, which seems like overkill.

thank u



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info