@ paul you might want to check if the form actually contains a label of that name just in case. Also, using/endusing for streamreaders are a lot easier
vb Code:
Using sRead As New IO.StreamReader("D:\Users\Arben\Desktop\SerieA.txt") Dim thisLine as string = "" Dim nLabel as Integer = 0 Do Until sRead.EndOfStream thisLine = sRead.ReadLine if Me.Controls.ContainsKey("Label" & nLabel) then Me.Controls("Label" & nLabel).Text = thisLine End if nLabel += 1 Loop End using




Reply With Quote