+ Reply to Thread
Results 1 to 20 of 20

ActiveSheet.Paste Error

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    ActiveSheet.Paste Error

    The following code keeps flaging ActiveSheet.Paste error. Help......


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    When you step over the code in which line exactly the code flags an error?

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: ActiveSheet.Paste Error

    Don't use ActiveSheet.Paste, you know the destination range you want to paste to so use that.
    Please Login or Register  to view this content.
    What exactly are you copying and pasting anyway?
    If posting code please use code tags, see here.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: ActiveSheet.Paste Error

    Hi,

    You don't say which instance of ActiveSheet.Paste (there are several) gives you the error.

    However since the procedure is not very efficiently written, upload an example workbook and describe in a note what you are trying to achieve and no doubt someone will provide a more efficient solution.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error

    I was able to make it work, but may still have issues. I cant seem to attach / upload the file. I placed a link to google drive for refernece. Im trying to pull data from 4 worksheets (named) on to 1, creating a masterlist (TSR_Dump). Is it possible to have the marco button on worksheet TSR_Report?

    https://docs.google.com/file/d/0B8fU...1MTVR3c0U/edit

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: ActiveSheet.Paste Error

    Hi,

    The FAQ explains how to attach a file. Upload it to this forum.
    Then, as I said, forget the current macro - it's not efficient, and explain what you want to achieve and what event you would want to use to kick off any macro. e.g. a simple button, every time you activate a specific sheet, every time you change a cell...whatever.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    I have came up with this code, but I am unable to test it as the worksheet is protected.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error

    My goal is to pull data from the named worksheets, ie... Steve_Zbell, Steve_Randall and create a data "dump" under TSR_DUMP. Then... this info is pulled to the TSR_Report via indirects. with my current crap code, i cant not run the marco "update" button from the TSR_Reports worksheet with out deleteing everything. let me know what you guys think. thanks

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    My code consolidate the 4 sheet names in to TSR. You can either test it yourself, or unprotect the cells as they are protected.

  11. #11
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error


  12. #12
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    I have downloaded both of your sheets and both are protected. What I mean is: The cells are protected. When I step over the code to test it, it stops at the begining, giving warning the cells are protected. Go to review and remove the password

  13. #13
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error

    Estimating_Projects_Tracking_Log_v4_2012_HELP2.zip

    OK now i understand,please try this

  14. #14
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    The attached is even worse:"Project is unviewable". I can not even view the project as you now have protected the Project enviorment as well.

  15. #15
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

  16. #16
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    Have you tested it yourself? I have tried to get around by copying every sheet in to different book, but still not luck. I am still being asked for a pass. I really do not know how to get around this problem. I suggest you test the code and see what it says. We may be able to work with out seeing the sheets.

  17. #17
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error

    Where can i turn off this protection? Maybe becuase its coming off a network drive? or is it a stupid exel option. I sent the last file to someone else in my office and they were able to view and edit the code. Try password 123.

    Can be your settings maybe:?
    http://office.microsoft.com/en-us/ex...55931.aspx#BM3

    i appericate your help thus far....

  18. #18
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    Okay,
    It is realy weird file. I am unable to attach it, but here is the code-Tested
    What the code does: Copy all rows, except headers, from each 4 names and paste them as values only to dump.

    Please Login or Register  to view this content.

  19. #19
    Registered User
    Join Date
    08-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 07 / 10 / 13
    Posts
    49

    Re: ActiveSheet.Paste Error

    Nice, it works. Still dont understand the protection issue thou. While i have your attention can you please take a look at this filtering marco i cant seem to figure out. I have attached a example.

    Book1_HELP.xlsm

  20. #20
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: ActiveSheet.Paste Error

    SZBell,
    I was partly to blame for the protection issue. The sheet was protected, despite there was no password, I had to go to the dump tab review to unprotect it , so as for the code to work.

    Sorry for giving you a hard time, but the bottom line is that you now have a working code.

    I think your second request is a different thread. As per forum's rule, could you please post it as a new thread?

    I am quite happy to answer any questions you may have regarding the first thread, but I do not want break forum's rule with the second request.

+ 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