+ Reply to Thread
Results 1 to 3 of 3

Runtime Error 1004 Method 'Range of Object'_Global' failed

  1. #1
    Registered User
    Join Date
    07-20-2011
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2007
    Posts
    36

    Runtime Error 1004 Method 'Range of Object'_Global' failed

    I have this code it works on my computer just fine, but when I have another person run it, it fails with the above runtime error. The other person's system has Excel 2007 and only had 2007 on it. My computer has had both 97 and 2007 on if it makes any difference.
    The code fails at the highlighted yellow spot. If I change the range to "Q2:Q250000" it fails on my computer the same way.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Runtime Error 1004 Method 'Range of Object'_Global' failed

    It could be due to version difference

    version 97 has only some 65536 rows
    2007 much much more. your last row is 201597

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Runtime Error 1004 Method 'Range of Object'_Global' failed

    A better option than hard-coding the last used row is use a variable:

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

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

+ 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