Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default userform labels

Hi, Ive got 20 labels on a userforn. Is there a better way to clear all
the labels, other than unloading and reloading the form. At the momment
i do, userform1.label1 = "", for all 20. I dont want to unload and
reload the form because label 21 keeps a count of procceses run while
form is in use.
Regards Robert

  #2   Report Post  
Posted to microsoft.public.excel.programming
ste ste is offline
external usenet poster
 
Posts: 18
Default userform labels

Try this in your UserForm

Private Sub xxx()
Dim Y As Control
Dim Cnt As Integer
Dim X As Integer
For X = 0 To Me.Controls.count - 1
Set Y = Me.Controls(X)
If TypeName(Y) = "Label" Then
Y.caption = ""
End If
Next
End sub

Regards,
Ste

RobcPettit wrote:
Hi, Ive got 20 labels on a userforn. Is there a better way to clear all
the labels, other than unloading and reloading the form. At the momment
i do, userform1.label1 = "", for all 20. I dont want to unload and
reload the form because label 21 keeps a count of procceses run while
form is in use.
Regards Robert


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default userform labels


Thankyou for your reply. That is perfect. thanks for taking the time
Regards Robert

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
Copying labels to Userform at runtime. Henry[_5_] Excel Programming 5 June 8th 05 11:47 PM
Linking labels to cells and turning off events in userform routeram[_10_] Excel Programming 0 November 13th 04 08:34 AM
Linking labels to cells and turning off events in userform routeram[_8_] Excel Programming 2 November 13th 04 08:01 AM
Vertical Alignment of text in Userform labels dht Excel Programming 1 June 16th 04 01:58 PM
Common format for Labels in Userform [email protected] Excel Programming 3 May 13th 04 11:14 AM


All times are GMT +1. The time now is 01:50 PM.

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"