Thread
:
Clearing of textboxes
View Single Post
#
2
Posted to microsoft.public.excel.programming
William[_2_]
external usenet poster
Posts: 227
Clearing of textboxes
Hi
Dim ctrl As Variant
For Each ctrl In UserForm1.Controls
If TypeOf ctrl Is MSForms.TextBox Then
If Not ctrl.Name = "TextBox6" And _
Not ctrl.Name = "TextBox3" Then _
ctrl.Text = vbNullString
End If
Next ctrl
--
XL2003
Regards
William
"CG Rosén" wrote in message
...
Good Day Group,
Have before from this group received help with clearing of many TextBoxes
in a Userform with the below code.
Is it possible to modify this code to except one or two TextBoxes from
being
cleared?
Brgds
CG Rosén
-------------------------------------------------------------
For Each Ctl In UserForm1.Controls
Select Case LCase(TypeName(Ctl))
Case "textbox"
Ctl.Text = vbNullString
End Select
Next
-------------------------------------------------------------
Reply With Quote
William[_2_]
View Public Profile
Find all posts by William[_2_]