Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Text labels on a Userform

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Text labels on a Userform

you could add another label. make it big enough to cover all the forms
labels, make it transparent and bring it to the front. then you only have to
handle one click event. You may need a couple if you can't reorganize the
labels, but it might mean coding a few new labels rather than many ...just
an idea

"Robert Crandal" wrote in message
...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textboxes and labels in Userform?? TotallyConfused Excel Programming 5 September 25th 09 05:01 AM
Excel 2007 text labels in category axis - missing labels Boris Charts and Charting in Excel 3 December 5th 08 04:33 PM
Help with userform labels [email protected] Excel Programming 3 April 23rd 07 09:39 PM
userform labels RobcPettit[_2_] Excel Programming 2 September 1st 06 07:23 PM
Vertical Alignment of text in Userform labels dht Excel Programming 1 June 16th 04 01:58 PM


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"