View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Clearing text in TextBoxes

Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is msforms.TextBox Then
ctl.Text = ""
End If
Next ctl

--

HTH

RP
(remove nothere from the email address if mailing direct)


"CG Rosén" wrote in message
...
Good Day Group,

Have a UserForm with abt 70 Text and ComboBoxes.
They are named TextBox1 etc but not in consecutive order. Is there a way
with a short code to clear the text
in these boxes to avoid using:

TextBox1 = "" etc. abt 70 times?

(The boxes are grouped in 5 Frames)

Thanks in advance.

Brgds

CG Rosén