Question Index Out Of Range Exception was unhandeld

Beware

Member
Joined
Dec 4, 2012
Messages
7
Programming Experience
3-5
I get this error:
Probleem.png

What is wrong with my code?
 
I would prefer to see you make the effort yourself. If you understand what the code you use does, then you can be a much better coder moving forward.

You have the Autos window open, the information is right there.. Try creating a variable to store the ofd.FileName.Count -1 value and see what the value is.. Then you will see why you are getting the OutOfRange error..
 
oft.FileNames, not ofd.FileName.
 
I would prefer to see you make the effort yourself. If you understand what the code you use does, then you can be a much better coder moving forward.

You have the Autos window open, the information is right there.. Try creating a variable to store the ofd.FileName.Count -1 value and see what the value is.. Then you will see why you are getting the OutOfRange error..

I know what I'm coding, i just made a typographical mistake. I read it 100 items but I just couldn't see it.

Thank you both!!!
 
Back
Top