+ Reply to Thread
Results 1 to 13 of 13

Subscript Out Of Range Error 9

  1. #1
    Registered User
    Join Date
    08-24-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Subscript Out Of Range Error 9

    Hi All

    I have written a Macro and I am not an expert at excel things so please assist. I am getting a subscript out of range error and when I go into the code it see below

    Untitled.jpg

    How can I fix this?

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Subscript Out Of Range Error 9

    You need to write the code as
    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    06-07-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: Subscript Out Of Range Error 9

    Try

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-24-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Subscript Out Of Range Error 9

    Now I am getting the below error

    Untitled.jpg

  5. #5
    Registered User
    Join Date
    08-24-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Subscript Out Of Range Error 9

    As I am pretty useless when it comes to reading code can you direct me towards anyone that I could possibly sent me file to and send my macro to and they can try to run it and see if they can fix the bugs?? I am close to tears at this stage

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Subscript Out Of Range Error 9

    Why dont you upload a sample file here ? The format should be the same as your original, just ensure you remove sensitive data.

    Put the code here as well using the code tags.

  7. #7
    Forum Contributor
    Join Date
    06-07-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: Subscript Out Of Range Error 9

    Maybe

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-24-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Subscript Out Of Range Error 9

    Ok.. here is the file with the information needed to be edited.

    Copy of Quote Log (2).xlsx

    And this is a copy of the macro

    e&m.xlsm

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Subscript Out Of Range Error 9

    Can you summarize what your code is trying to do, so i can help you correct it?

  10. #10
    Registered User
    Join Date
    08-24-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Subscript Out Of Range Error 9

    It is eventually trying to look like this.... or close to it....


    test vnhgc.xlsx

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Subscript Out Of Range Error 9

    Your main data in the Copy of Quote log and Test Vnhgc looks the same. Which parts of the file are you trying to automate?

  12. #12
    Registered User
    Join Date
    08-24-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Subscript Out Of Range Error 9

    The macro I am creating is automating the editing and structure of the file..
    The information remains the same but it is more refined and edited and sheets and formula's are inserted.

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Subscript Out Of Range Error 9

    It will be good if you specify which parts (which cell ranges in which sheets)?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1