+ Reply to Thread
Results 1 to 8 of 8

Keep receiving Run-time error '1004': Application-defined or object-defined error

  1. #1
    Registered User
    Join Date
    10-15-2014
    Location
    DC
    MS-Off Ver
    2010 (work) / 2013 (home)
    Posts
    15

    Keep receiving Run-time error '1004': Application-defined or object-defined error

    I'm having trouble correcting this code I've written to output certain values on one of my data sheets to another sheet. I keep receiving the Run-time error '1004': Application-defined or object-defined error.

    Any suggestions on how I can go about fixing this?



    Please Login or Register  to view this content.
    Last edited by Fotis1991; 10-23-2014 at 09:46 AM. Reason: Pls use code tags around your codes!

  2. #2
    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
    48,893

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    You probably need to upload a sample workbook with some typical data that demonstrates the problem.

    Apart from several undefined variables, the code runs through in a workbook with some minimal data


    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


  3. #3
    Registered User
    Join Date
    10-15-2014
    Location
    DC
    MS-Off Ver
    2010 (work) / 2013 (home)
    Posts
    15

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    My apologies! Attached is a sample sheet.

    Just manually sorting through the sample data i have attached, the following are what should be outputting onto the second sheet if the macro worked correctly?

    Index Time Dock Door Scheduled Route/Trip
    11-39 00:50 39 Trip 15 - Outgoing
    14-39 01:05 39 Trip 21 - Incoming
    19-39 01:30 39 Trip 31 - Incoming
    19-39 01:30 39 Trip 32 - Outgoing
    Attached Files Attached Files

  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
    48,893

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    Please Login or Register  to view this content.


    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    2
    3
    4
    5
    6
    Instances dock doors are in a 30 minute warning:
    544
    7
    8
    List of Dock Doors with a 30 minute warning:
    Index
    Time
    Dock Door
    Scheduled Route/Trip
    9
    10
    11
    12
    13
    14
    15
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    16
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    17
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    18
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    19
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    20
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    21
    Nov-39
    00:50
    39
    Trip 15 - Outgoing
    22



    Regards, TMS

  5. #5
    Registered User
    Join Date
    10-15-2014
    Location
    DC
    MS-Off Ver
    2010 (work) / 2013 (home)
    Posts
    15

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    Hmm so the code DOES work, just outputs the wrong data. Thanks TMS

  6. #6
    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
    48,893

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    so the code DOES work, just outputs the wrong data

    I can't help feeling that the two halves of that sentence are mutually exclusive ... at conflict, even

  7. #7
    Registered User
    Join Date
    10-15-2014
    Location
    DC
    MS-Off Ver
    2010 (work) / 2013 (home)
    Posts
    15

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    Hmm so the code DOES work! It just outputs the wrong data!

    Thanks TMS!


    (punctuation solves a lot!)


    It'll be a blast figuring out what's wrong in the code, haha. But seriously, thank you.

  8. #8
    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
    48,893

    Re: Keep receiving Run-time error '1004': Application-defined or object-defined error

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. excel macro run time error '1004'- Application defined or object defined error
    By kmadan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2014, 09:51 AM
  2. Replies: 1
    Last Post: 03-12-2014, 12:42 PM
  3. [SOLVED] Run time error 1004 Application-Defined or Object-Defined Error - Placing data into next e
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-27-2014, 12:57 PM
  4. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  5. [SOLVED] run-time error '1004' application-defined or object-defined error - Excel 2007
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2012, 02:46 AM

Tags for this Thread

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