Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6 : Clearing all text boxs...

Status
Not open for further replies.

PogoWolf

Programmer
Mar 2, 2001
351
US
Hello all!
I hoping this is a quick Q.. I've got a form with allot
of text boxs and a few combo boxes.. what I'd like to be able to pull off is a loop to be able to clear all the text boxs and reset the combo box index..

I thought I might be able to use something like

For Each Item In FORM.Controls
Item.Caption = ""
Next

or something to that effect...

Thanks!!!! ******
Darkness... Bleakness...
and Plastic forks...
--The PogoWolf
 
Clear all Textboxen :

Private Sub Command1_Click()
Dim Contrl As Control
For Each Contrl In Form1.Controls
If (TypeOf Contrl Is TextBox) Then Contrl.Text = ""
Next Contrl
End Sub

Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
PERFECT!!!!!
Thank you! =)
******
Darkness... Bleakness...
and Plastic forks...
--The PogoWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top