Public Function ClearALL(ByRef MyForm As VB.Form)
For i = 0 To MyForm.Controls.Count - 1
If UCase(TypeName(MyForm.Controls(i))) = UCase("TextBox") Then
MyForm.Controls(i).Text = ""
End If
Next
End Function
Private Sub Command1_Click()
Call ClearALL(Me)
End Sub