+ Reply to Thread
Results 1 to 6 of 6

Problem in paste - Run time error 1004

  1. #1
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Problem in paste - Run time error 1004

    Hello Friends

    Please find the attached 2010 version file (Problem in paste Run time error 1004.xlsm)

    While running the macro it shows the folowing error

    Run-time error `1004':
    Paste method of Worksheet class failed

    at Sheets("Output").Paste in the VBA code

    Please help me to rectify this issue.

    thanks in advance
    Attached Files Attached Files
    Sekar

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Problem in paste - Run time error 1004

    I cannot replicate the error. It works for me. Excel 2013.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Problem in paste - Run time error 1004

    Takes a long time to run but no error either. Excel 2007
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Problem in paste - Run time error 1004

    Hello Friends

    Thanks to all friends who tested my file.

    I also noticed this file is working in Windows 7 8 GB RAM Excel 2010 but not working and creating the error message
    in Windows 8.1 pro 2 GB RAM same Excel 2010.

    By using below procedure i changed the priority to `Realtime' from default `Normal' and now Excel producing
    the charts per VBA code without producing the errors.

    Thanks again to all friends who tested my file.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MS Excel memory increase :
    Winodws 8.1 Pro to MS Excel 2010 Memory increase.

    Open Excel 2010, go to `Task Manager'
    Select `Microsoft Excel' in `Apps' area
    `Task Manager' > `Details' tab,
    Select `EXCEL.EXE' > right click > Set priority >
    Change deafult `Normal' to `Realtime'.
    Confirmation `Do you want to change the priority of `EXCEL.EXE'
    Click `Change Priority'.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Attached Files Attached Files

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Problem in paste - Run time error 1004

    Glad it works now and thanks for the rep.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: Problem in paste - Run time error 1004

    Well, that's a new one for me. I have to keep this in mind. Thanks for reporting.

    I had a similar issue in the past where I copied a file and then opened it for the purpose of deleting, hiding and locking sheets for a final user report. It worked sometimes and failed others. I had to add a DoEvent to let the code to copy the file complete before trying to open it.

+ 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. When Activesheet.paste, Run-Time error '1004': Paste method of work sheet class failed.
    By devaraj2020 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2015, 01:59 AM
  3. VBA Vlookup Problem - run time error '1004'
    By rsami in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-11-2013, 11:13 AM
  4. Excel Macro Error - Run time error 1004 - Paste method of worksheet class failed
    By kvflynn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2012, 10:51 AM
  5. Run time error 1004 syntax problem
    By 1eyedjack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2010, 04:51 AM
  6. Problem Run-time error '1004'
    By PeterSi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2007, 08:46 AM
  7. VBA VLookup Problem: Run-Time error '1004'
    By hurlbut777 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2005, 09:06 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