+ Reply to Thread
Results 1 to 8 of 8

paste method of worksheet class failed

  1. #1
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    paste method of worksheet class failed

    Hi my code is as follows
    step 1
    sheet pool activate
    filtering certain records
    selection
    copy
    another sheet activate
    filtering same data
    paste

    but error is shown while pasting

    please resolve
    Please Login or Register  to view this content.
    Last edited by arlu1201; 07-10-2012 at 06:33 AM. Reason: Use code tags in future

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: paste method of worksheet class failed

    Are you trying to copy filtered data and paste it into a filtered range?

    Why dont you attach a sample file which you are using with this code? Remove all sensitive data. Ensure that the format is the same as the original file.

    To Attach a File:

    1. Click on Go Advanced.
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: paste method of worksheet class failed

    i have made attachment
    discussion as follows
    we have certain product say 95 product
    which is sold in different part of city or district
    now i have to Paste one consolidated sale (say 95 + Total ) 96 rows
    in 3 locaition say pune location in pune-01,02,03 (96 X 3 ) Rows
    which is one by one pune-01 95 prodcut and total same for pune 02 03
    i have tried too hard but excel fails to paste
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: paste method of worksheet class failed

    I am not able to understand the link between your question and the file you have attached. Maybe you can show us a "Before" and "After" sheet so i can understand your question easily.

  5. #5
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: paste method of worksheet class failed

    Quote Originally Posted by arlu1201 View Post
    I am not able to understand the link between your question and the file you have attached. Maybe you can show us a "Before" and "After" sheet so i can understand your question easily.
    sir as you please

    be clear
    1 data have to paste is of 146 row which get filltered and get selected

    2 and have to paste in (146 X 3 ) in one shot

    3 and find after sheet for your perusal

    for emergency please call me on +919004675577
    Attached Files Attached Files

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: paste method of worksheet class failed

    Please explain some more. Which fields need to be filtered?

    What do you mean by paste into 146 x 3?

  7. #7
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: paste method of worksheet class failed

    Quote Originally Posted by arlu1201 View Post
    Please explain some more. Which fields need to be filtered?

    What do you mean by paste into 146 x 3?
    sir
    data have to paste sheet filter data is vijaywada
    select from b7 to bj152
    in before sheet select b4 to b441 and simpaly paste
    but for macro without giving instuction

    read this macro you will get idea

    Please Login or Register  to view this content.
    Last edited by arlu1201; 07-16-2012 at 05:24 AM. Reason: Use code tags in future.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: paste method of worksheet class failed

    Note: I have put code tags for you again in post 7. Please do so in future. See my signature for more details on that.

    Coming back to your code - It wont work the way your code is structured.

    What you can do is, sort both your sheets based on column A which contains the Pool.

    Come to hq sheet, filter for the pool and delete the rows. Then go back to the 2nd sheet, filter for the pool and copy the rows and paste it in the first sheet.

    Does this work for you?

+ 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