|
-
Jun 20th, 2005, 04:23 PM
#1
Thread Starter
Fanatic Member
For Loop Not Working [RESOLVED]
I am trying to find all of the Textboxes in my form, but its not working. How do I do this?
VB Code:
dim TXBX as textbox
for each txbx in me.controls
msgbox "HERE's ONE!"
next
Thanks,
Sir Loin
Last edited by Sir Loin; Jun 20th, 2005 at 04:39 PM.
-
Jun 20th, 2005, 04:34 PM
#2
Re: For Loop Not Working
i would do it like this.
VB Code:
Dim ctr As Control
For Each ctr In Me.Controls
If TypeOf ctr Is TextBox Then
MsgBox "HERE's ONE!"
End If
Next ctr
casey.
-
Jun 20th, 2005, 04:38 PM
#3
Thread Starter
Fanatic Member
Re: For Loop Not Working
Oh, i didn't think about doing it like that...thanks!
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
|