Hi All,,
Same as the title,
Can we clear all textboxes in same time? this is possible?
Its consume many time to code if we have to write clear code for every textbox.

Best Regards

If you have array textboxes then you can use looping to clear text box :

Dim i as Integer
For i = 0 to 10
    txt(i).Text = ""
Next

Or you can check if the type of control is text box then clear the control text.

For Each txt In Form1.Controls
    If TypeOf txt Is TextBox Then txt.Text = ""
Next
commented: Really Great :) +1
commented: agree +12
commented: Helping +3

Thank you jx..
your code working great..

God Bless You.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.