elrayiss
asked on
clear button
i want the clear button to clear the whole thing at one time. i got some code but i have to keep on hitting clear to clear each text box. help please. thank you.
Private Sub Clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Ctl As Control
For Each Ctl In Me.Controls
If TypeOf Ctl Is TextBox Then
Ctl.Text = ""
End If
Next
End Sub
which button do you have to keep on hitting? from what I see, hitting button2 should clear all the textbox but considering your other questions, you have code in the TextChanged event of some textbox that short-circuit the clearing.
ASKER
what im doing is that when im hitting the clear button on one textbox at a time is clearing i want it to get cleared from one hit.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent.