- Home
·
- Miscellaneous
·
- Clear all textboxes, comboboxes, listviews,...... from a form. General, works with all forms and al
Clear all textboxes, comboboxes, listviews,...... from a form. General, works with all forms and al
Clear all textboxes, comboboxes, listviews,...... from a form. General, works with all forms and all controls (I haven't yet tested all but it
API Declarations
Rate Clear all textboxes, comboboxes, listviews,...... from a form. General, works with all forms and al
(1(1 Vote))
Dim MyControl As Control
'you may expand this function with as many typeofs as u like :)
'contact: [email protected]
For Each MyControl In frmName.Controls
If TypeOf MyControl Is TextBox Then MyControl.Text = ""
If TypeOf MyControl Is CheckBox Then MyControl.Value = vbUnchecked
If TypeOf MyControl Is ComboBox Then MyControl.Clear
If TypeOf MyControl Is ListView Then MyControl.ListItems.Clear
If TypeOf MyControl Is RichTextBox Then MyControl.Text = ""
Next
End Sub
Clear all textboxes, comboboxes, listviews,...... from a form. General, works with all forms and al Comments
No comments yet — be the first to post one!
Post a Comment