run-time error '9'

  1. tlc53

    VBA Error if more than 1x spreadsheet open

    Hi, I have code in my main spreadsheet which works fine, no problems at all, until I open another spreadsheet. If two or more spreadsheets are open and I do anything in any of the spreadsheets (select from drop down menu for example) it produces "Run time error 9 - Subscript out of range"...
  2. C

    How to set another workbook as a variable

    I am trying to set an open workbook as variable book2 but keep getting a 'Subscript out of range' error. Below is the code I am working with. It errors at 'Set book2'. It's completely random and will work sometimes but most of the time it doesn't. Could someone help? Set book1 = ActiveWorkbook...
  3. E

    Run-Time error 9

    I am having an issue trying to figure out this debug error. I get Subscript is out of range when we add an entry into table for LOBName. We have a total of 101 entries right now. If we remove the last one it works but throws an error as soon as we add 101. This line highlights yellow...
  4. T

    First VBA Macro - Run-time error 9: Subscript out of range

    Hey MrExcel Community! Long time browser here, you guys have basically taught me VBA 101(thanks!) but first post as I can't seem to find my specific problem in other threads. I'm an actuary, definitely not a coder, and am trying to make a simple button/program to keep a main 'Outstanding...
  5. J

    Subscript out of range error

    I am attempting to have a user form where the user clicks on a button to Add content into a worksheet. The code is as follows. 'Summary: Button for User to Add DAA. User clicks button and userform1 appears. 'User adds DAA, Career Path, Moves applicable Skills and Strengths to the right listbox...
  6. S

    Run-time error '9' with ThisWorkbook.Sheets Function

    I have run into the problem with ThisWorkbook.Worksheet function. I started doing tutorials by VBAIsFun on youtube and I am running into trouble with this function. Here is the tutorial that I am having trouble with : Excel VBA Basics #7 - Using specific sheets, Hiding, Unhiding and Selecting...
  7. L

    Delete Worksheet if it exists, if not ignore

    Hi, I am trying to write an ErrHandler code but am having a few issues. Basically I want the Err message to delete a worksheet called "Scorecard" and one called "Comparison" if they exist. If they don't then I would like the macro to continue. The macro I have written scrapes a website and...
  8. T

    Runtime Error '9' Subscript out of range

    I'm receiving a Runtime Error '9' Subscript out of range when I try to run run the below code. I've tried changed the Range("A5").Select but that didn’t help. The code below was created using the macro recorder. This is the part that is highlighted when debugging Windows( _...
  9. T

    run-time error '9': subscript out of range

    just inserted the code and now I get run-time error '9': subscript out of range. any ideas? Private Sub Workbook_Open() Select Case ThisWorkbook.Sheets("aiiwwaxexcel0").Range("a3").Value Case "History" History_Order_Guide_Without_Pricing2 'macro that runs Case "ItemBrowse"...
  10. K

    Error btw Mac Excel 2003 and PC Excel 2007: "Run-time error '9' Subscript out of range"

    Hi, I have a Excel/VBA script written 5-6 years ago on a Mac running Excel -- probably 2003. (It is not an option to go back and work on that Mac and software version.) I need to get this to run in Excel 2007 on a PC. This is my first time debugging VBA scripts. I've been able to remove some...
  11. B

    "Run-time error '9' Subscript out of Range" when trying to copy Sheet name to an array element

    Hello all: First post. I'm using VBA in Excel 2007. I have been trying to code a subroutine to find the last sheet and the sheet names of the tabs in a workbook. Then I'm attempting to place those sheet names in an array. I suspect that I'm not using the right class of object or the right...
  12. B

    Copying Worksheet - Run-time error '9'

    Hello, I am working with Excel 2003 on Windows XP. I have a master workbook with 14 different worksheets and I am trying to create 7 different workbooks from it; two sheets per workbook. To give you an idea of what I'm trying to do, I've outlined 8 of the worksheets below: Equipment...
  13. C

    Mysterious Run-time error '9'

    On occasion, I run my macro and receive this error that indicates "Subscript out of range"....with no option to Debug. I then close the excel document, re-open and run the macro again and no issue what-so-ever. :confused: Any ideas?

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