out of range

  1. G

    runtime error 9 - Subscript Out of Range Error or runtime 1004 - method 'range of object' worksheet failed when trying to color cell

    Hi, I have a vba code that is intended to highlight cells based on value of the cell i.e. if it is empty. The code identifies the cell values correctly but it will not colour the cell. I keep getting an runtime error 9 - Subscript Out of Range Error or runtime 1004 - method 'range of object'...
  2. D

    Subscript out of range, constant not recognised weirdness. Pls Help! :-(

    hi, i am out of my depth here. I cold really use some help. I have cobbled together a macro that (should) look through a column, create new sheets based on the values in that column, copy the sheets to a new workbook with a name chosen by the user, then delete the new sheets on the original...
  3. C

    VBA Problem: Subscript Out of Range

    Hi all, I am seeing a strange error when running a simple line of VBA code. When I personally run the VBA macro I do NOT get the error message but when my colleague runs the VBA macro they get the "subscript out of range" error. The line of code causing this is the following. Dim...
  4. F

    Eliminate out of memory

    Hi, let say I have code: Dim L1 as Long, Dim L2 as Long Dim L3 as Long, Dim L4 as Long Dim L5 as Long, Dim L6 as Long Dim sum_L as Long L1 = 1 L2 = 100 L3 = 10000 L4 = 1000000 L5 = 100000000 L6 = 10000000000 sum_L = L1+L2+L3+L4+L5+L6 'error when I try to add above value, I got error...
  5. A

    Subscript out of range

    Hi guys, So I am new to VBA. I created a function to add 2 arrays and return a new array with added values. I count the length of the arrays and resize the new array to the size of the passed arrays. However I got subscript out of range error on the line "addedArray(k) = array1(k) + array2(k)"...
  6. W

    Subscript out of range

    I keep getting an error message saying subscript out of range with this code. Sub Check_First() Dim Z As Integer Z = 1 Do While Z <= Range("o1").Value Range("r1").Value = Z Range("AH2").Select Range("A2:AJ2").Select Selection.AutoFilter Selection.AutoFilter...
  7. N

    VBA Macro to Rename a Worksheet in all Excel Files in a Folder

    I am really new to VBA. I am trying to use the code below to rename one worksheet in multiple files within one folder, but I keep getting a Subscript Out of Range error at the underlined line. The names are accurate, so that isn't the issue. Can anyone tell me what else could be wrong? Sub...
  8. J

    Subscript Out of Range

    Hi I’m having a lot of trouble with a sentence of my code because it’s returning a subscript out of range error, what my code is trying to do is filtering the data, base on the user input and if the word exists then show that in the lisbox, if not, show a message to the user, I’m sure there is...

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