by Singin Gekko (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Fri 18th April 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Procedure to clear all textboxes in a form
' Following code can be put
' in a basic module
Public Sub ClearTextBoxes(frm As Form)
Dim c As Control
For Each c In frm
If TypeOf c Is TextBox Then c.Text = ""
Next c
End Sub
' Following is the calling code
ClearTextBoxes Me
' OR
Call ClearTextBoxes(FrmName)