I'm using a while loop and it works fine, but it uses an integer variable and at the end I made it increase by 1 each time it loops. the problem is that, the variable is used in the loop but it seems like the variable doesn't go up.
ex:
VB Code:
Dim intLineNumber As Integer = 1 Private Sub Button2_Click() While intLineNumber <= 5 Log1.Text = Log1.Text & vbNewLine & "Changing " & Form1.TextBox1.Lines.GetValue(intLineNumber - 1) & "..." intLineNumber = intLineNumber + 1 End While End Sub
"intLineNumber = intLineNumber + 1" has an effect on the While... Loop, as it doesn't continue infinitely, but it has no affect on the GetValue. What's the problem?
Thanks,
Phil.





Reply With Quote