+ Reply to Thread
Results 1 to 9 of 9

Run-time error "1004" Application defined or object-define-error

  1. #1
    Registered User
    Join Date
    05-18-2005
    Posts
    17

    Run-time error "1004" Application defined or object-define-error

    I have this code which you guys helped me to do it:
    Please Login or Register  to view this content.

    Then I inserted a code in this workbook:

    Please Login or Register  to view this content.
    And when i execute the first code above I get the run-time error "1004".

    thank you

  2. #2
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Run-time error "1004" Application defined or object-define-error

    Hi josros you could continue in previous thread.
    I inserted your code the same place you did and it worked fine for me.
    Can you tell me in which line of code an error occurred?

  3. #3
    Registered User
    Join Date
    05-18-2005
    Posts
    17

    Re: Run-time error "1004" Application defined or object-define-error

    It give the error and highlight in yellow this line of code:


    Please Login or Register  to view this content.
    Thank you

  4. #4
    Registered User
    Join Date
    06-24-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Run-time error "1004" Application defined or object-define-error

    I am still learning a lot. Most of the problems I occur have been solved already in the past and allows me to learn fast.

  5. #5
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Run-time error "1004" Application defined or object-define-error

    @josros60, are you by any chance opening a 2003 workbook (i.e. ReportProxyServlet.xls) from within a 2007/2010 workbookbook (thisworkbook)? If the answer is YES, then change your line of code into

    Please Login or Register  to view this content.
    If you like my contribution click the star icon!

  6. #6
    Registered User
    Join Date
    07-09-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Run-time error "1004" Application defined or object-define-error

    yes, i print a report from a website "ReportProxyServlet.xls" and it's save in excel.

  7. #7
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Run-time error "1004" Application defined or object-define-error

    Hey josros6074 (aka josros60 - is it the same person?) did you save WRITEOFF file as Excel 2007 file (xlsm)? If yes, that may be the cause why you get an error

  8. #8
    Registered User
    Join Date
    07-09-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Run-time error "1004" Application defined or object-define-error

    thank you worked just changing the lie of code to the one you suggest:
    Please Login or Register  to view this content.

  9. #9
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Run-time error "1004" Application defined or object-define-error

    Great. I had posted this recently in the tips & tricks section. The underlying cause is that without the Sh2. the Rows.Count parameter returns a value that is too high for the 2003 workbook, but by qualifying the parameter to the 2003 worksheet it only returns 65k which is valid

+ 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