|
-
Dec 16th, 2003, 04:47 PM
#1
Thread Starter
Frenzied Member
Comparing controls to datatypes? [Resolved]
How can I iterate through the Controls collection, checking whether the control is a textbox? Here's what I have so far:
VB Code:
For Each c In Controls
If c.GetType Then
End If
Next
Whatever I try after c.GetType gives me syntax errors. Thanks.
Last edited by salvelinus; Dec 17th, 2003 at 08:38 AM.
-
Dec 16th, 2003, 07:44 PM
#2
Addicted Member
try >>
For Each c In Controls
If typeof(c) is textbox Then
End If
Next
-
Dec 17th, 2003, 08:37 AM
#3
Thread Starter
Frenzied Member
Thanks persianboy. I thought of that last night in a duh! moment. I'm porting a vba app in Access to vb.net, so sometimes just follow the code there w/o thinking. I appreciate the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|