Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform labels
Thankyou for your reply. That is perfect. thanks for taking the time Regards Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying labels to Userform at runtime. | Excel Programming | |||
Linking labels to cells and turning off events in userform | Excel Programming | |||
Linking labels to cells and turning off events in userform | Excel Programming | |||
Vertical Alignment of text in Userform labels | Excel Programming | |||
Common format for Labels in Userform | Excel Programming |