+ Reply to Thread
Results 1 to 4 of 4

Macro Enabled Excel - Run Time Error 1004

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    India
    MS-Off Ver
    Microsoft 2007
    Posts
    1

    Macro Enabled Excel - Run Time Error 1004

    Hi All,


    I am using a macro enabled excel file for the purpose of calculating certain accruals of income and depreciation on contracts. However I experienced a run time error 1004 -
    Application – defined or object –defined error


    This error has never occurred to the earlier users of the same macro. I do not understand if the source file from which the data is getting copied into the macro file is corrupt or not.

    Find below the VB program code , I have highlighted the line where the error seems to occur when I clicked on the debug option. Would appreciate if anyone would be able to help me resolve it and also explain me in laymen terms what the issue is. I am from finance background with no knowledge about VB

    Thanks alot for the support


    ERROR is occuring with the below line

    Range("hdrCount").Offset(1).Resize(rrData).PasteSpecial xlPasteFormulas



    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by arlu1201; 03-15-2013 at 04:00 AM. Reason: Use code tags in future.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro Enabled Excel - Run Time Error 1004

    attach your file
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: Macro Enabled Excel - Run Time Error 1004

    The only obvious things to check are 1) if the named range hdrCount exists and 2) what value does rrData have. Is the sheet you are copying to protected?

    And, as Patel45 has suggested, maybe a good idea to upload a sample workbook that exhibits the problem.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: Macro Enabled Excel - Run Time Error 1004

    Oh, and the other point is, it's hard to diagnose a run time error if you don't have the workbook and data that is producing it


    Regards, TMS

+ 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