ptran2000
asked on
User defined mapping?
This is my current code, it works fine, but I need to add another element which I don't know how to go about it. As you can see below,
txtLocation(0).text = Trim(Mid(strBuff, 342, 9))
txtLocation(1).text = Trim(Mid(strBuff, 424, 9))
and so on .... txtLocation(15)
Except, that I do not always want txtLocation(0).text = Trim(Mid(strBuff, 342, 9)). It could equal any one of the 16 values. A user would decide which values goes with which txtLocation.
The user input would come from from2, where there are 16 boxes called txtUserDefinedLocation(ind ex).text
Thus if txtUserDefinedLocation(0). text =1 Then txtLocation(0).text = Trim(Mid(strBuff, 424, 9))
-------------------Code--- ---------- ----
Private Sub RefreshScreen1()
Dim strBuff As String
strBuff = Display.Contents
Dim i As Integer
Dim x As Integer
x = 342
For i = 0 To 15
txtLocation(i).Text = Trim(Mid(strBuff, x, 9))
x = x + 82
Next
End Sub
----------------End of Code------------
Thanks much
txtLocation(0).text = Trim(Mid(strBuff, 342, 9))
txtLocation(1).text = Trim(Mid(strBuff, 424, 9))
and so on .... txtLocation(15)
Except, that I do not always want txtLocation(0).text = Trim(Mid(strBuff, 342, 9)). It could equal any one of the 16 values. A user would decide which values goes with which txtLocation.
The user input would come from from2, where there are 16 boxes called txtUserDefinedLocation(ind
Thus if txtUserDefinedLocation(0).
-------------------Code---
Private Sub RefreshScreen1()
Dim strBuff As String
strBuff = Display.Contents
Dim i As Integer
Dim x As Integer
x = 342
For i = 0 To 15
txtLocation(i).Text = Trim(Mid(strBuff, x, 9))
x = x + 82
Next
End Sub
----------------End of Code------------
Thanks much
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
wouhou! You got it PatrickVD!
Thanks a lot!
Thanks a lot!
Thanks for the compliment ptran2000 !
If happen to visit Belgium some day, you'll buy me a drink on this one ! ;-)
Happy coding,
Patrick.
If happen to visit Belgium some day, you'll buy me a drink on this one ! ;-)
Happy coding,
Patrick.
Private Sub RefreshScreen1()
Dim strBuff As String
strBuff = Display.Contents
Dim i As Integer
Dim x As Integer
x = 342
For i = 0 To 15
txtLocation(i+1).Text = Trim(Mid(strBuff, x, 9))
x = x + 82
Next
End Sub
This would fill txtLocation(1) thru txtLocation(16) and not fill txtLocation(0)...
If this is not what you're looking for, please explain further...
Cheers!®©