error 9

  1. I

    VBA code to identify one open workbook only working when certain workbook is open in a specific order?

    Hello. So I have this VBA code to identify two open workbooks and match data across them. One is Routing. One is Pickorder. This one is a unique name daily but always has PickOrder in it along with the current date. When this code is run a third workbook is open (not part of code). However when...
  2. C

    Runtime error 9 excel macro

    I'm not sure what I'm doing wrong when entering this code, but I did use it before and I'm not sure what I did the last time. Basically what i'm trying to do is to copy a range of columns and paste them into another set of columns. When I type the macro the error comes up for the first line...
  3. M

    run time error 9 in a Set statement

    When this sub is run a get run time error (subscript out of range) at stared statement. I know the location is correct because I used this location to open the workbook. This error message does not seem to apply this statement. Help Sub SingleRecord()<o:p></o:p> Rem Records payroll...
  4. Y

    Subscript Out of Range Error in VBA

    Hey All, I have the following code in one of my Excel files. Using it to automatically filter team based on what is selected on the home screen. There are various charts which are then processed based on the filter selection. Private Sub Worksheet_SelectionChange(ByVal Target As Range)...
  5. M

    VBA - Making new folder in directory

    Hi all, after much lurking I'm here with a real question. I'm trying to use VBA to create a new folder named after the client, then save an excel file in that new folder. I'm able to create the folder, but my folder name output is not what I was expecting (it's coming out as a 10 digit number...
  6. H

    Runtime Error 9 "Subscript Out of Range" Assistance

    Hi! I am creating a macro and in one part of it I am attempting to move all of the sheets from one workbook to another workbook. When I attempt the macro, it comes up with an error 9 "subscript out of range". Any idea how I could fix this? For further detail, I am deleting sheets in workbook...
  7. T

    Error "9"

    I'm making a spreadsheet that organizes several weather conditions and made an array that lists the conditions, but I get an error when I move to the 13th form (not a prank, it just happens on 13). Dim sn() As Variant sn = Array("Wind Speed", "Wind Direction", "Ambient T", "Wind Chill Temp"...
  8. B

    Error 9: Subscript Out of Range

    Whats good homies, I am a excel noob and I get this error 9 when I try to run this. Since it doesnt specify what line is actually wrong, Im wondering if any of the VB Guru's can point me in the right direction in terms of whats wrong with this code? Very confused!:mad: Private Sub...
  9. A

    Urgetnt Help !!!! error : Subscript out of range error

    Hi I am working on huge data file. I am applying just three filters and copy pasting that data into different workbook. after filtering I have : Range("A1").Select Selection.CurrentRegion.Select Selection.CopySet wkbOpen = Workbooks.Open(Filename:="path\Output.xlsb")...
  10. G

    Using VBA to make a copy of the Active Worksheet

    This driving me insane.. :( I want to make a copy of the current worksheet into the same workbook and assign a new name to it. Basically, I have a Raw Data worksheet, which I want to duplicate so it can be processed into a final layout. All the other code works fine, I just need to automate the...
  11. A

    Redim Preserve Mystery - Excel Can't Redim Preserve array with 1

    Team, After this last upgrade Microsoft pushed this past weekend, many of my workbooks stopped working when I go from Redim vArray(0 to 0) to Redim Preserve vArray(1 to 1) - Apparently 1 is skipped. Simple Code 1 - Not working: Private Sub ArrayTest1() Dim vArray As Variant ReDim...
  12. S

    Excel VBA Error 9 with PivotTables

    Hello, I recorded a macro to create and setup a pivottable from Sheet "Tags" to Sheet "Flt Hours". When I ran the recorded macro, I got a message saying Error 9: subscript out of range. The highlighted code is: ActiveWorkbook.Worksheets("Flt Hrs").PivotTables("PivotTable1").PivotCache. _...
  13. X

    Why does this not work?

    Hey MrExcel i dont understand why this: StrAddress = Worksheets(Counting).Cells("R2") Dont work. I want my StrAddress to always to be referring to the Cell R2 in my Counting Sheet
  14. K

    VBA Error 9. HELP!

    Hey guys, when I try to run macro, it is giving me error 9. Please help!!! Here is my coding, and I cannot figure out what is wrong with it. Sub HR_Amazon() Dim sVariable As String Dim vEntry As Variant Dim iCounter As Integer Dim iCounter2 As Integer Dim iCounter3 As...
  15. J

    Printing a Sheet - Subscript Out of Range

    All, When I run this, assuming quarterNumber = 1, I get an error 9: subscript out of range. Public Sub PrintAllAreas() Dim quarterNumber As String Dim strFile As String quarterNumber = QuarterToPrintForm.QuarterBox.Text Const strPath = "Omitted"...
  16. C

    Trying to close a file but get "error 9"

    sfile is defined prior to reaching the close statement. The file is open. Assuming I figure out why, will it error out if the file is not open? Public Sub Print_Batch_RS() Application.ScreenUpdating = False '****Establish the file BatchRecords to put the data into sfile =...
  17. 9tanstaafl9

    Can I assign a sheetname to a variable?

    How would I assign an unknown sheetname to a variable so that I can go back to the worksheet again in my macro when I don't know what the name of the sheet will be (the sheet is being added during the macro?) I was trying to do someting like this, but I keep getting a Runtime Error 9 subscript...
  18. O

    Problem with Error 9 while using files already open

    Hello, I have a macro that should post a note in a cell wheever this is highlighted in red. The content of the note comes from the value at the same location in another file. I have tried running the code with some parts not active and all seems to come from the 'If' statement, notes appear...
  19. WadeExcel

    Error 9 - subscript not in range

    New VBA User, understand the basics. Recorded and then edited together some macros into one subroutine. Have sent that macro out to several people in different locations. It has worked for everyone except one person in one location. That person is receiving an error 9 message "subscript not in...

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