Home computickets Run-Time Error '9': Subscript Out of Range

Run-Time Error ‘9’: Subscript Out of Range

Author

Date

Category

Hello. In the Visual Basic program pops up error

Run-Time Error ‘9’: Subscript Out of Range

on the line

image1.picture = LoadPicture ("C: \ Books \" + Pictures (k)).

What should I do?


Answer 1, Authority 100%

What should I do?

Reply from the comment:

Check the size of the array / sequence and the index value.


Answer 2, Authority 100%

Yes, it’s most likely in the value of the variable k .

And it still did not prevent the + sign on & amp; , there can also be a reason, but it usually causes the 9th code.

And at the beginning of each form / module in non-release version add

option explicit

It will help to debume the code.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions