"T. Wintershoven" <pl*********@grp.com> wrote
Hello,
I have a few textboxes placed on a SSTab control devided over 3 tabs
Is there a way to clear all textboxes in one time in stead of one by one.
Someone told me "Use for each item in.........."
???????????
There is no one command to clear all textboxes. You have to do them
individually. Are your textboxes part of an array? If so, use For/Each
on that array. If not, use For/Each on the Controls collection and text
each item to be sure it is a textbox.
If you are doing that sort of thing in several different places, with
sometimes different textboxes, then it may pay to turn it into a command:
Private Sub ClearText(ParamArray Boxes())
Dim box
For Each box In Boxes
box.Text = ""
Next
End Sub
You can use that like:
ClearText Text1, Text3, Text11, Text15
ClearText Text2, Text4
It will accept any number of controls, just be sure they are Textboxes....
HTH
LFS
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----