You didn't even do as I did in the example!
What is the purpose of "lines2"?
It's an Integer (number) and you are trying to set a Text (String) property to it.
I told you to set the Value and MaxValue of the ProgressBar, not the RepareList (which I presume is your listbox).
Finally you have added a second For Each loop that loops through an Item, something that does not make sense at all. You want to loop through the lines as usual, and increment the progressbar value inside that loop.
Try adding the following to your first code:
Code:
Dim n As Integer = lines.Count()
Try to work out yourself where this should go, it's not that hard. If you get an error, it is most probably easy enough to understand what you need to change from what it says!
And modify the For Each loop like this:
Code:
ProgressBar1.Value = 0
ProgressBar1.MaxValue = n
For Each line As String In lines
RepareList.Items.Add(line)
ProgressBar1.Value += 1
Next
ProgressBar1.Value = ProgressBar1.MaxValue