Wednesday, May 14, 2008

How to Clear all Text in a TextBox

First create a variable:
Dim Sayre As Control

Then Type this code in a Button:
For Each sayre In Me
If TypeOf sayre Is TextBox Then
sayre.Text = ""
End If
Next
####################################
Private Sub Command1_Click()
Dim sayre As Control

For Each sayre In Me
If TypeOf sayre Is TextBox Then
sayre.Text = ""
End If
Next
End Sub
####################################