+ Reply to Thread
Results 1 to 3 of 3

Getting Subscript Out of Range

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    30

    Getting Subscript Out of Range

    I don't know why my VBA code got Subscript Out of Range. Can anybody please look at my code.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,764

    Re: Getting Subscript Out of Range

    There is nothing obviously wrong with the code, so it may be the data. When this runs, and the error occurs, show the value of filepath in the debugger. If it is null then Split will return an empty array and you will get that error trying to index it.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-21-2014
    Posts
    30

    Re: Getting Subscript Out of Range

    Thank you so much looking my code, and I have found the problem.

    Please Login or Register  to view this content.
    If InStr(filename, DealFileNames) <> 0 Then
    DealFileNames ---> should be DealFileName

    anyway, really appreciate you spending time look at the error.
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what does subscript out of range mean?
    By amartino44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 01:55 AM
  2. Subscript out of range error while populating array from range.
    By Aussiexile in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2010, 02:22 AM
  3. Subscript out of range error when trying to select a range
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2010, 07:57 PM
  4. Subscript out of range?
    By Iamkar33m in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2007, 10:22 AM
  5. subscript out of range
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2005, 03:56 PM

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