September 22nd, 1999, 10:30 AM
Hello,
I have 12 text boxes. When the "LostFocus" event is triggered, I call a sub routine (see below) "OrderTickers".
I need to capture the the actual text in box X (1-12). Currently my variable is returning the string 'txtTick1.Text' instead of 'AMZN'. How can I capture the string that is in txtTick1.Text?
private Sub OrderTickers(tickNum as Integer)
Dim ii as Integer
Dim MyVal
Dim curVal
curVal = "txtTick" & tickNum & ".Text"
for ii = 1 to 12
MyVal = "txtTick" & ii & ".Text" 'eg: txtTick1.Text (I need to see AMZN)
If len(Trim(MyVal)) > 1 then
MyVal = curVal
End If
next
End Sub
I have 12 text boxes. When the "LostFocus" event is triggered, I call a sub routine (see below) "OrderTickers".
I need to capture the the actual text in box X (1-12). Currently my variable is returning the string 'txtTick1.Text' instead of 'AMZN'. How can I capture the string that is in txtTick1.Text?
private Sub OrderTickers(tickNum as Integer)
Dim ii as Integer
Dim MyVal
Dim curVal
curVal = "txtTick" & tickNum & ".Text"
for ii = 1 to 12
MyVal = "txtTick" & ii & ".Text" 'eg: txtTick1.Text (I need to see AMZN)
If len(Trim(MyVal)) > 1 then
MyVal = curVal
End If
next
End Sub