inkedgfx
Well-known member
Hello ,
I wrote a sub to get a txt file from a web site then it supposed to split the numbers in the txt file and fill labels with the numbers....everything works except it doesnt fill the last label with a number....wondering why?
code:
thanks for any help.
InkedGFX
I wrote a sub to get a txt file from a web site then it supposed to split the numbers in the txt file and fill labels with the numbers....everything works except it doesnt fill the last label with a number....wondering why?
code:
Dim SourceNumbers As String = GetLotterynumbers() Dim num As String = Mid(SourceNumbers, 1) Dim DrawDate As Match = Regex.Match(SourceNumbers, "[0-9]*/[0-9]*/[0-9]{4}") WinningNumbersDrawDate = DrawDate.Value Dim stringSplit() As String = num.Split(","c) Dim Index, numbers(5) As Integer lblWinningNumbers.Text = lblWinningNumbers.Text & " " & WinningNumbersDrawDate For i As Integer = 0 To stringSplit.Length - 1 If Integer.TryParse(stringSplit(i + 1), numbers(Index)) Then Index += 1 Label1.Text = numbers(0) Label2.Text = numbers(1) Label3.Text = numbers(2) Label4.Text = numbers(3) Label5.Text = numbers(4) Label6.Text = numbers(5) WinningNumberOne = numbers(0) WinningNumberTwo = numbers(1) WinningNumberThree = numbers(2) WinningNumberFour = numbers(3) WinningNumberFive = numbers(4) WinningNumberSix = numbers(5) If Index = 6 Then Exit For End If Next
thanks for any help.
InkedGFX
Last edited: