Hi all,
I have some code similar to what I've written below...
Basically I have 5 textboxes named txtBox1 - 5. I'm trying to get their VALUES not their names.
And it'd be nice to find whether my approach is even possible.
The lines in red are of concern to me.
Thanks!
I have some code similar to what I've written below...
Code:
Function vbaExample()
Dim counter As Integer
Dim frm as Form
[COLOR=Red]Dim box as Control[/COLOR]
Set frm = Forms!frmExample
counter = 0
Do
counter = counter + 1
[COLOR=Red] box = "frm.txtBox" & counter
MsgBox box.Value[/COLOR]
Loop Until counter = 5
End Function
And it'd be nice to find whether my approach is even possible.
The lines in red are of concern to me.
Thanks!