01.
Dim
a
As
String
02.
03.
Public
Function
ClearALL(
ByRef
MyForm
As
VB.Form)
04.
For
i = 0
To
MyForm.Controls.Count - 1
05.
If
UCase(TypeName(MyForm.Controls(i))) = UCase(
"TextBox"
)
Then
06.
MyForm.Controls(i).Text =
""
07.
End
If
08.
Next
09.
End
Function
10.
11.
Private
Sub
Command1_Click()
12.
a = Text1.Text
13.
Call
ClearALL(
Me
)
14.
End
Sub
15.
16.
Private
Sub
Command2_Click()
17.
MsgBox
" "
& a
18.
End
Sub