I have a loop that is like this:
my question is, is there a way to check if the control is a textbox??Code:For Each Control In Me
Control.Text = ""
Next
Printable View
I have a loop that is like this:
my question is, is there a way to check if the control is a textbox??Code:For Each Control In Me
Control.Text = ""
Next
Code:if TypeName(Control) = "TextBox" then Control.Text = ""
wow, you got an answer for all my questions, huh?
An alternative method (and as far as I know it only works with teh controls from StdLib - ie the stabndard controls in the VB runtime) is:
If TypeOf Ctrl Is TextBox then
'Do something
End iF