subscript out of range

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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 =...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. H

    Error while copying cells in another normal xls workbook when VBA Macro sheet is open

    Hi, I am facing a peculiar problem. I have built excel VBA macros for various functionalities like create dynamic excel workbooks based upon userform input values and some manipulations as required. Now, when this VBA Macro excel sheet is open (not running). I am not able to copy any cells...
  15. B

    Using a variable for worksheet name

    Hi all - first, let me say this is an enormously helpful forum! For weeks I've found every answer I needed without even registering. I will be sure to contribute back as/when I'm able! I have an issue using a variable as a worksheet name. I have code finding the first name of a user from...
  16. P

    Subscript our of range with ReDim Preserve and UBound

    Hello. I partly created a code which tries to group data based on the values of an array. The problems are that I'm trying to extract data from multiple worksheets that belong to the same workbook so ReDim Preserve seems to fall out of range when the code reaches the 2nd worksheet. I'm not sure...
  17. V

    Error when running Macro with other excel workbooks open

    I have a Userform that runs a macro to perform a series of operations by reading data from a database I created in the same workbook but on a different sheet. If I have other excel files/workbooks open when I run the macro via the Userform, I get a 'Run Time Error 9: Subscript is out of range'...
  18. D

    Subscript out of range error in query table code

    Hi All, I've scavenged some code from a forum and I'm getting a subscript out of range error and I'm not sure what's going on. I'm really pretty new to VBA so go easy on me please. Also, sorry for the code snippets not being up to snuff in terms of formatting...I couldn't get the MrExcel add...
  19. ncjefffl

    recorded macro stops working when data set is smaller than when originally recorded

    I've got a macro that I recorded (because I don't know how to write one) that just copies certain columns from one tab into another. It's been working until today, where I get a" subscript out of range" error and it goes to the highlighted section of my code (below). I think the issue is that...
  20. E

    Subscript Out of Range Error '9

    Hi there!!! I am creating spreadsheets for several cost centers. Each cost center has a number of departments. Some cost centers have 2 or 3 departments; other cost centers have as many as 15 departments. I have a macro that will automatically add 3 worksheets in the workbook for each...

Some videos you may like

This Week's Hot Topics

Top