by karada (6 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 8th February 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Clear all text boxes on a form with 6 lines of code.
'Add a command button and put the code...
Private Sub Command1_Click()
Dim ctr As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
End If
Next
End Sub