Hi,
I'd like to know is it possible to do something like the following
VB Code:
For each objcontrol in form.controls if objcontrol is a textbox objcontrol.text = "" end if Next
Is this possible
Printable View
Hi,
I'd like to know is it possible to do something like the following
VB Code:
For each objcontrol in form.controls if objcontrol is a textbox objcontrol.text = "" end if Next
Is this possible
Moved from CodeBank.
This is how you would code it:VB Code:
Dim ctrl As Control For ctrl In Me.Controls If TypeOf ctrl Is TextBox Then ctrl.text = vbNullString End If Next
Thanks Hack,
I just realised I had posted it in the wrong place. Was browsing through the codebank and hit new thread from there Typeof was the keyword I was looking for
Cheers
Happens all the time. :)Quote:
Originally Posted by simonhorne