Monday, May 28, 2012

Menghapus Isi TextBox Dengan Cepat Menggunakan For...Each

Option Explicit 

Public Sub
ClearAllTextBoxes(frmClearMe As Form)
Dim txt As Control
For Each txt In frmClearMe
If TypeOf txt Is TextBox Then txt.Text = ""
Next
End Sub


Private Sub Command1_Click() 
ClearAllTextBoxes Me
End Sub