atesh Posted September 7, 2003 Posted September 7, 2003 Why do I get 'Specified argument was out of the range of valid values.'? Dim z as integer = 0 While srReader.Peek() > -1 z += 1 ListBox(1).Items.Item(z) = srReader.ReadLine() ListBox(1).Items.Add(ListBox(1).Items.Item(z)) End While Total it is supposed to load a little over 7000 lines into the listbox. I don't know if this has anything to do with it. Quote To err is human, to really foul things up requires a computer.
*Experts* mutant Posted September 7, 2003 *Experts* Posted September 7, 2003 Its probably because you add one to z before doing anything to the listbox and it overflows by one. Try putting z =+ 1 after modifying the listbox. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.