How to clear all text boxes
Can someone help me out here?
Want I want to do is clear all my text and combo boxes without having to do each one individually.
I've done it before but I can't remember how.
Web Development
Can someone help me out here?
Want I want to do is clear all my text and combo boxes without having to do each one individually.
I've done it before but I can't remember how.
by andrew
It helps if you let us know what platform/language you're using, but here's a way for a Win32 app in VB:
Dim oControl as Control
For Each oControl In Form1
Select Case TypeName(oControl)
Case "TextBox"
oControl.Text = ""
Case "ComboBox"
oControl.Clear
End Select
Next
Sorry about that. It would have been a great idea.
I'm using VB6, so that code is exactly what I was looking for.
Thanks for your help.
This discussion is closed to new replies.
Sort by Trending