Private Sub Form_Load()
Call 清空所有文本框内容
End Sub
Private Sub 清空所有文本框内容()
Dim o As Object
For Each o In Me.Controls
If TypeName(o) = "TextBox" Then
o.Text = ""
End If
Next
End Sub
VB中其他类型:
Data
FileListBox
DirListBox
DriveListBox
Timer
VScrollBar
HScrollBar
ListBox
ComboBox
OptionButton
CheckBox
CommandButton
Frame
TextBox
OLE
Image
Line
Shape
Label