subscript out of range

Mr. McDuffee

New Member
Joined
Aug 31, 2006
Messages
7
All -

I have a user at a remote location that keeps getting this message when printing a spreadsheet that he has been using for the past couple of years. Microsoft Visual Basic error that states Run time error '9', subscript out of range. It then gives him the option to continue, end, debug, and help, but only End is active.

The only problem is that I am not sure how to look at the code, or decipher the code. I am not sure who developed the workbook, and neither is he.

Can anyone give me guidance on what to look for and possibly telling me how to view the code so I can have someone look it over.

Thanks in advance,

Mr. McDuffee

P.S. Sorry if this has been addressed other areas. If it has, can you please direct me to where I can find the info.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
In English this error means something that was in the workbook is now missing (or that something has had its named changed so it can't find it) - hence the code can't complete.

We won't know what this is, unless we look at the whole workbook. Do you have an IT department who can look at this for you?

To look at the code hold down "ALT + F11" (or click on debug when the error message appears).

Post part of the code that is highlighted by the debugger and we can see what it is that is missing...
 
Upvote 0
I am part of the IT department. I am working on this for a user at a remote location. I just don't have any trainging in VB, and I thought this would be good experience. I am not actually supposed to work on VB errors, since they are the ones who created the worksheet, they are supposed to maintain them, but I like a new challenge.

Thanks for the advice. I will take a look at the code. As for running debug, the user cannot select debug, he can only chose end.

Thanks again, I will post the code when I get the file.
 
Upvote 0
Mr. McDuffee

Do you have any idea how this code is being run?

Is it from a userform?

If it is, that's could be one reason why the user can't select Debug.
 
Upvote 0
Userform = form / GUI.

It could well be that the VBA code is password protected - so you won't be able to see the code. :confused:
 
Upvote 0
Most likely it is userform. I will have to contact the user. He should be in now (two hour delay).

Edit - Alas it is password protected. Guess I will have to crack it since the creator resigned from the company three years ago.
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,980
Members
448,934
Latest member
audette89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top