|
-
September 22nd, 1999, 10:30 AM
#1
Evaluate
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
-
September 22nd, 1999, 01:50 PM
#2
Re: Evaluate
It is much easier if your text box only diffrent in the index number.. in this case u r using the same name for the text box but differ in index.. so what u've to do is call the textbox by index num.. like this text1(x).text where x is index
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
|