I have around 150 testboxes on around 10-15 different frames, and they arent in an array, anyone know the way to clear all the text boxes, I knew at one time but sorta forgot and misplaced the program I did before.
: I have around 150 testboxes on around 10-15 different frames, and they arent in an array, anyone know the way to clear all the text boxes, I knew at one time but sorta forgot and misplaced the program I did before. :
Oehhhhh, bin a long time since i've seen this code, but i think i still know it: [code] Dim ctrl As Control
For Each ctrl In Me.Controls If TypeName(ctrl) = "Textbox" Then ctrl.Text = "" End If Next [/code] This should get you going. You said they were all on different frames? How ever did u get that all on one form?!
: : I have around 150 testboxes on around 10-15 different frames, and they arent in an array, anyone know the way to clear all the text boxes, I knew at one time but sorta forgot and misplaced the program I did before. : : : : Oehhhhh, bin a long time since i've seen this code, but i think i still know it: : [code] : Dim ctrl As Control : : For Each ctrl In Me.Controls : If TypeName(ctrl) = "Textbox" Then : ctrl.Text = "" : End If : Next : [/code] : This should get you going. You said they were all on different frames? How ever did u get that all on one form?! : : Greets... : Richard : : Yeah that is it, couldnt remember it cause been forever since I used it. And using all the frames strictly by making a frame on a new form, copy and pasting it and the code over to the main form. Hardcoding the location of each frame into a Call framedisply (so on) on form load so you can move them wherever. Ill prob be posting the program here once I finish it, it pretty nice stockmarket/banking program
: : I have around 150 testboxes on around 10-15 different frames, and they arent in an array, anyone know the way to clear all the text boxes, I knew at one time but sorta forgot and misplaced the program I did before. : : : : Oehhhhh, bin a long time since i've seen this code, but i think i still know it: : [code] : Dim ctrl As Control : : For Each ctrl In Me.Controls : If TypeName(ctrl) = "Textbox" Then : ctrl.Text = "" : End If : Next : [/code] : This should get you going. You said they were all on different frames? How ever did u get that all on one form?! : : Greets... : Richard : :
Personal preference:
[code]Dim ctrl As Control For Each ctrl In Me If TypeOf ctrl Is TextBox Then ctrl.Text = "" Next [/code]
: : : I have around 150 testboxes on around 10-15 different frames, and they arent in an array, anyone know the way to clear all the text boxes, I knew at one time but sorta forgot and misplaced the program I did before. : : : : : : : Oehhhhh, bin a long time since i've seen this code, but i think i still know it: : : [code] : : Dim ctrl As Control : : : : For Each ctrl In Me.Controls : : If TypeName(ctrl) = "Textbox" Then : : ctrl.Text = "" : : End If : : Next : : [/code] : : This should get you going. You said they were all on different frames? How ever did u get that all on one form?! : : : : Greets... : : Richard : : : : : : Personal preference: : : [code]Dim ctrl As Control : For Each ctrl In Me : If TypeOf ctrl Is TextBox Then ctrl.Text = "" : Next : [/code] :
If you mean one-upping you, it's because I tend to remember the code that is easiest and takes the least amount of time to type out. I'm simply too lazy... uh, I mean [italic]efficient[/italic], to do all that typing.
Comments
:
Oehhhhh, bin a long time since i've seen this code, but i think i still know it:
[code]
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeName(ctrl) = "Textbox" Then
ctrl.Text = ""
End If
Next
[/code]
This should get you going. You said they were all on different frames? How ever did u get that all on one form?!
Greets...
Richard
: :
:
: Oehhhhh, bin a long time since i've seen this code, but i think i still know it:
: [code]
: Dim ctrl As Control
:
: For Each ctrl In Me.Controls
: If TypeName(ctrl) = "Textbox" Then
: ctrl.Text = ""
: End If
: Next
: [/code]
: This should get you going. You said they were all on different frames? How ever did u get that all on one form?!
:
: Greets...
: Richard
:
: Yeah that is it, couldnt remember it cause been forever since I used it. And using all the frames strictly by making a frame on a new form, copy and pasting it and the code over to the main form. Hardcoding the location of each frame into a Call framedisply (so on) on form load so you can move them wherever. Ill prob be posting the program here once I finish it, it pretty nice stockmarket/banking program
Greets...
Richard
: :
:
: Oehhhhh, bin a long time since i've seen this code, but i think i still know it:
: [code]
: Dim ctrl As Control
:
: For Each ctrl In Me.Controls
: If TypeName(ctrl) = "Textbox" Then
: ctrl.Text = ""
: End If
: Next
: [/code]
: This should get you going. You said they were all on different frames? How ever did u get that all on one form?!
:
: Greets...
: Richard
:
:
Personal preference:
[code]Dim ctrl As Control
For Each ctrl In Me
If TypeOf ctrl Is TextBox Then ctrl.Text = ""
Next
[/code]
: : :
: :
: : Oehhhhh, bin a long time since i've seen this code, but i think i still know it:
: : [code]
: : Dim ctrl As Control
: :
: : For Each ctrl In Me.Controls
: : If TypeName(ctrl) = "Textbox" Then
: : ctrl.Text = ""
: : End If
: : Next
: : [/code]
: : This should get you going. You said they were all on different frames? How ever did u get that all on one form?!
: :
: : Greets...
: : Richard
: :
: :
:
: Personal preference:
:
: [code]Dim ctrl As Control
: For Each ctrl In Me
: If TypeOf ctrl Is TextBox Then ctrl.Text = ""
: Next
: [/code]
:
How do you always do that? ;-)
Greets...
Richard
If you mean one-upping you, it's because I tend to remember the code that is easiest and takes the least amount of time to type out. I'm simply too lazy... uh, I mean [italic]efficient[/italic], to do all that typing.