0

The part in bold is the part I need help with. I'm using VB 2003 and That line is VB6 code. The Right and Left functions don't apply to VB2003 and I need to know what I can replace that with to get the same result. Here I'm trying to update the displaying of the selected word as the user picks a letter. I have absolutely no clue what would replace it as I haven't used left and right before. Help? Thanks.


Sub Letterpick()
Dim i As Integer
nomatch = True
For i = 1 To length
letter2 = Mid(allwords(rndnum), i, 1)
If letter2 = letter Then
nomatch = False
lblWORD.Text = Left(lblWORD.Text, i - 1) _
& letter2 & Right(lblWORD.Text, length - i)

End If
Next
End If
End Sub

3
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by waynespangler
0

I am not exactly sure what you would like to do with the text of this label, but if you want to include a number of spaces (the number is always varying) to the left and right of the text, then you can use the padleft and padright methods. Just write lblWORD.text.padleft, or lblWORD.text.padright, to use it.

hope that helps,
adrcam

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.