+ Reply to Thread
Results 1 to 3 of 3

Copy Paste Coding Needed

  1. #1
    Registered User
    Join Date
    12-28-2011
    Location
    India
    MS-Off Ver
    2003, 2007 and 2010
    Posts
    34

    Copy Paste Coding Needed

    Hi,

    I am trying to build a system in a file where I want to control the copy paste action from the sheet1 to any other sheets or workbooks.

    If the user has copied cells A1:C10 of sheet1, before he paste it in another worksheet or workbook, i want to decide whether the pasting can happen or not. I will allow only A1:A10 cells of sheet1 to be copied and pasted anywhere apart from that no other cells of sheet1 should be copied and pasted.

    I am looking for a VBA code which i can put it in a worksheet and workbook events.

    Note: I do not want to go by protecting sheet concept, i am looking for another way

    Regards,
    Hari

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Copy Paste Coding Needed

    I suggest NOT to put in sheet or workbook code.
    park the macro in the module and run it when necessary
    if you want you can create a button from form toolbar (view-toolbar-form)
    and assign this macro to it

    see the comments in the macro

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-28-2011
    Location
    India
    MS-Off Ver
    2003, 2007 and 2010
    Posts
    34

    Re: Copy Paste Coding Needed

    Hi Venkat,

    I thank you for this code, but in this code where am i restricting the user to copy only the A1:A10. My issue i want to restrict the user to copy only A1:A10 no other cells of sheet1 should be copied, is it possible to make it.
    Hari
    "Trying to find excel boundaries"

+ 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