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
|