+ Reply to Thread
Results 1 to 4 of 4

Paste Special generating Error Type 1004

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Paste Special generating Error Type 1004

    Following code copies all the data in 'Schedsheet' range A4 - EN(lastrow), finds the cell in 'DBSheet' Col A matching A4 on the 'SchedSheet', and defines that cell as "Found".

    Should then paste the copied data to that FOUND cell.

    But it throws Error 1004 (Method 'Range of object' _Worksheet failed), and I can't see why?

    Please Login or Register  to view this content.
    Hopefully someone can see the error?

    All solutions, pointers or alternatives welcomed

    Ochimus

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Paste Special generating Error Type 1004

    Hi

    DBSheet.Range("FOUND"). suggests there is a named range, called FOUND. Instead, FOUND is just a range so:

    replace:

    Please Login or Register  to view this content.
    with:

    Please Login or Register  to view this content.
    Better yet, since technically the item might not be found, FOUND could still be nothing so I'd actually put:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Paste Special generating Error Type 1004

    Arkadi,

    Many thanks for prompt solution.

    Having "Dim"'d 'FOUND' as a Range, I always assumed it would be treated as a "Named Range", so that's a key lesson learned!

    Now marking this as Solved

    Ochimus

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Paste Special generating Error Type 1004

    Glad I could help Ochimus It is always great learning something new.

    Thanks for the rep, and marking the thread as solved.

+ 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. Run-time error 1004 - Paste special
    By aratcliffe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2015, 04:52 AM
  2. runtime error 1004, Paste special method of range class failed
    By Goodstart14 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-12-2015, 03:32 PM
  3. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  4. Run time error: 1004 Paste special method of range class failed
    By amethystfeb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2014, 02:04 AM
  5. Paste Special Error 1004
    By VJayakumar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2013, 03:55 PM
  6. RUNTIME ERROR: 1004, Paste Special
    By BrandonJL in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-12-2010, 06:37 AM
  7. RUNTIME ERROR: 1004, Paste Special
    By BrandonJL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2010, 05:17 AM

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