An error message

plainme

Board Regular
Joined
Mar 23, 2010
Messages
60
What does the following error message means?

Run-time error '9'
Subscript out of range

Thanks!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I'd say it is probably being caused somewhere else in your code. Try taking all of your code out of this sub and replacing it with

MsgBox "This works"

just to prove that the code is not the problem.
 
Upvote 0
Yeah, it will work. You can have it in there 10 times, but it doesn't do anything differently than just turning it off once. Usually you turn screenupdating off while you are running code that changes things on the screen and then you turn it back on when you are done.

Did you try removing the code from the sub?
 
Upvote 0
Well, if that works and the msgbox shows up, then it must be in the code. Try putting it back one piece at a time until it doesn't work anymore. This should let you know where the problem is.
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,767
Members
452,940
Latest member
rootytrip

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