Q: run-time error '9' subscript out of range microsoft 2007 excel This thread is locked from future replies

I am using Microsoft Excel 2007.


I get the Run Time Error '9' Subscript out of range : When running the macro that I have created.


I do not have any fancy c++ or c# coding. I am simply using the developers tab menu and recording a macro that registers all my movements (button clicks).

The MACRO simply formats an existing excel document in a way that I want to have it in.


I have this MACRO already set-up on several other computers for the business in different locations (cities) and I do not have this problem.


I am only experiencing this problem on this specific work station.


Could anyone help me solve this problem?







Generally, subscript out of range in a recorded macro would be indicative of trying to refer to a non-existent sheet.  Possibly a sheet that existed when the recording was made had a name change - perhaps accidentially.  the code might say




but the current name of Sheet1 might actually be  "Sheet1 "  with an added space someplace in the name.  These type problems are hard to detect - so you will need to look carefully.




Tom Ogilvy


Tom Ogilvy

Did this solve your problem?

Sorry this didn't help.

26 people were helped by this reply

Question Info

Views: 13,626 Last updated: March 15, 2018 Applies to: