subscript out of range

  1. G

    New VBA Subscript Out Of Range Error

    Hello All, I am trying to select sheets to generate a PDF by using a UserForm with checkboxes so the user can select which sheets he/she wants generated into a PDF. Below is my code and I feel as if I am close but I continue to get a "Run-time error '9': Subscript out of range" at the...
  2. G

    VBA Subscript Out Of Range

    Hello All, I am trying to select sheets to generate a PDF by using a UserForm with checkboxes so the user can select which sheets he/she wants generated into a PDF. There are 2 sheets "Cover" and "PP" that must be included anytime a user wants to generate a PDF. Below is my code and I feel as...
  3. K

    Getting "Subscript out of Range" error while trying to open an random workbook which is already open

    Hello All, I am new VBA and Macros. I am trying to open a workbook and if it is already open just activating that workbook. But I am getting "Subscript out of Range" error again. Below is the snippet of my code. Sub Activating() Dim DestFile As String Dim wb As Workbook DestFile =...
  4. welshraz

    Help With Copy and Paste Macro

    Hi, I am trying to create a macro that copies and pastes all the data from one tab in a closed workbook into an open and active one. Two main considerations: the name of the source file changes every day and the amount of data with vary each day (some days one line of data, other times...
  5. Foo_Man_Chu

    subscript out of range error that doesn't make sense

    I have a spreadsheet where the following code runs after a button is clicked. The code is supposed to ultimately update another spreadsheet from the current spreadsheet. When it runs it gives me a subscript out of range error on this line : Workbooks(file).Worksheets("Esc-Gum-LD").Range(F29) =...
  6. G

    Run time error 9 - Subscript Out of Range Error

    I use Excel 2016 Office 365 and I have been trying to fix why my code has a Run time error 9 - Subscript Out of Range Error on this line of code: ActiveSheet.Range(Cells(i, "A"), Cells(i, lastcoldest)).Interior.ColorIndex = RGB(255, 242, 204) I'm having the code to compare the data in column...
  7. J

    Please help, Subscript out of range error

    Hi, I'm currently trying to write a VBA code, it looks like this: Dim currentTopPos1 As Long Private Sub cmdSaveData1_Click() Dim settings As Variant Dim info() As String Dim index As Long With Sheets(sheet_settings1) ReDim info(1 To getLR1(.Name, "A") - 1)...
  8. C

    Subscript Out of Range Error Identifying Duplicates Using Color Scale

    This code seems to work great in identifying duplicates within a column; uses colors to group 'like' dups - but is throwing the Subscript Out of Range Error 1/2 way through it's identification process (when it's running on a longer list) -- short lists - it doesn't throw the error. I found it...
  9. E

    Subscript Out of Range - Copying from workbook to workbook

    I'm pretty new to VBA, so I'm not too familiar with the errors and exact coding rules. I'm getting a Run-time error '9': Subscript Out of Range when I use this macro: Sub CopyStuff() Range("d4:I15").Copy Workbooks("C:\Users\emyyra\Desktop\Random...
  10. K

    Runtime error '9': Subscript out of Range

    Hey guys I have had a friend helping me put together this code. Basically I have .txt files I have information on and I need to add that information to an existing database by matching ID numbers however the ID number in the .txt is embedded in the middle of a larger ID number. (i.e. on excel I...
  11. G

    Excel VBA Run-time error '9' Subscript out of range

    I am not very knowledgeable in coding. Just a marketing student trying to do some research. I borrowed this code from the internet to collect data on movies. When I run the function, it shows me error 9 - subscript out of range (in bold - year = parts1(2)). I tried looking for answers and...
  12. 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...
  13. B

    Getting subscript out of range error

    hey guys i am getting this subscript out of range error on my a program in excel set up at my work. The problem is that it was set up a long time ago and it has been converted many times and now it barely works. I fixed most of the errors on it but i am still getting an error on this substring...
  14. 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...
  15. P

    subscript out of range

    Hi, The following code seems to work to fine, however at the end it says "subscript out of range" - please could you help? Much appreciated. Sub exportsheets() Dim wbNew As Workbook Dim rngTM As Range Dim strPath As String On Error GoTo Errorcatch Application.ScreenUpdating =...
  16. K

    Fox and Hound game

    I need help I need to know how to store this set of numbers in an array and to compare them to another variable. I am getting a subscript out of range error, and I just do not understand why at all. The trouble I am having is getting the values to store in the array and compare. Maybe it's my...
  17. Z

    Copy Sheets of a specific color from multiple workbooks into 1 consolidated file

    Hi, I'm trying to take all the sheets of a specific color (in my code below it's light blue) from a group of workbooks and combine them into one new workbook. This code works for the first file, but then gives me a "subscript out of range" error when trying to copy the tabs from the second...
  18. T

    Cannot use ListObject object - subscript out of range

    I am having trouble accessing the Excel ListObject object using VBA code where I keep getting Subscript out of range errors as if there are no recognised lists on the spreadsheet where I try to run the code. I can see the list and I know the sheet is active when I run the test below. I was of...
  19. S

    Selecting data in another spreadsheet

    Hi, I'm trying to select a range of cells in a worksheet that's open on the computer but is not the workbook where the macro is running. I keep getting this message though: "Subscript out of range" with the following line highlighted: Workbooks("Book1").Activate I understand it has something to...
  20. J

    Run-time error '9': SUbscript out of range?

    This error message pops up when I run the macro, "Run-time error '9': Subscript out of range" I was wondering what could be wrong with the code? "Sheets(sheetName).Activate" is highlighted. THANKS!!! Here is my code: Function calAutoNumber(sheetName As String, StartCol As String, startrow As...

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