+ Reply to Thread
Results 1 to 3 of 3

Error 1004, abort all?

  1. #1
    Forum Contributor
    Join Date
    07-04-2014
    Location
    Netherlands
    MS-Off Ver
    all
    Posts
    121

    Angry Error 1004, abort all?

    In this case I'm copy some range and paste it to another place.
    This works fine. Only when there is no data in the copyrange I see a runtime error.
    How to avoid the code and show users the errorcode what the problem is?

    Please Login or Register  to view this content.
    Last edited by mreFF; 07-27-2014 at 09:41 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Error 1004, abort all?

    Hi, mreff,

    why not check if data is available by checking the last visible row number for the range to be greater than the row number for the header before trying to copy and only copy if there is data?

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    07-04-2014
    Location
    Netherlands
    MS-Off Ver
    all
    Posts
    121

    Re: Error 1004, abort all?

    Thnx HahoBe,

    Please Login or Register  to view this content.
    Last edited by mreFF; 07-27-2014 at 06:27 AM.

+ 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. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  2. [SOLVED] Getting Error 1004 Object or Application Defined Error - Code to rearrange data
    By BlazzedTroll in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-10-2013, 12:10 PM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  5. [SOLVED] run-time error '1004': Application-defined or object-deifined error
    By rich5665@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2005, 05:05 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