+ Reply to Thread
Results 1 to 3 of 3

VBA Disbale Copy&Paste in target range (not complete sheet/workbook)

  1. #1
    Registered User
    Join Date
    10-13-2020
    Location
    Munich, Germany
    MS-Off Ver
    2016 32-bit
    Posts
    3

    VBA Disbale Copy&Paste in target range (not complete sheet/workbook)

    Hello everyone

    I am quite new to VBA and this forum and hope somebody of You can help me.

    I am preparing an Excel Sheet which is clustered in an input area, required editable variables (cells with data validations) and an output area (formulas). To protect my formulas and variables, I locked a great portion of the sheet via the intrinsic cell protection. However, I have cells with drop-down menus und editable variables which I can not lock. As far as I know, the only way to protect a cell with data validation ist to disable copy&paste fuction. I searche din lots of forums but could only find quite old code which seems to not work at all. The major problem is that I want to enable these functions only in a specific target area and not the whole sheet/workbook.

    I am thinking of a combination of these 3 code blocks to get this problem solved, however my skills are that minor, that I can't figure it out by myself.

    Please Login or Register  to view this content.
    AND
    Please Login or Register  to view this content.
    AND this 3. code which undos changes to certain target ranges. It works fine but doesn't inhipit copy and past.

    Please Login or Register  to view this content.
    Thank you very much in advance for your help.

    Best regards
    RobGER
    Last edited by RobGER; 10-28-2020 at 04:48 AM.

  2. #2
    Registered User
    Join Date
    10-13-2020
    Location
    Munich, Germany
    MS-Off Ver
    2016 32-bit
    Posts
    3

    Re: VBA Disbale Copy&Paste in target range (not complete sheet/workbook)

    In the meanwhile I solved this Problem on my own. In case anyone is interested, find the code below:

    Please Login or Register  to view this content.
    Cheers,
    RobGER
    Last edited by RobGER; 10-28-2020 at 04:52 AM.

  3. #3
    Registered User
    Join Date
    10-13-2020
    Location
    Munich, Germany
    MS-Off Ver
    2016 32-bit
    Posts
    3

    Re: VBA Disbale Copy&Paste in target range (not complete sheet/workbook)

    I further updated the code to protect cells in the worksheet by clearance in a better manner. Some cells are protected by data validation, so far cannot be cleared by "backspace" but still when pressing "Delete".

    Please Login or Register  to view this content.
    Cheers,
    RobGER
    Last edited by RobGER; 11-27-2020 at 04:31 AM.

+ 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. [SOLVED] Copy range and paste on sheet in same workbook
    By Chris1976 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-07-2020, 07:13 AM
  2. Replies: 3
    Last Post: 02-18-2020, 02:01 PM
  3. Copy dynamic range from closed workbook paste as table into specific sheet
    By Huskersippi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2019, 11:35 PM
  4. [SOLVED] copy range A4:A100 and paste on another workbook's sheet but one by one
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-01-2014, 08:11 AM
  5. [SOLVED] Macro to find data in source workbook and copy paste to target workbook
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-23-2014, 06:21 AM
  6. Copy same range from multiple sheets and paste into one sheet of active workbook
    By jadown in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2013, 01:41 PM
  7. Copy A Range of Cells Or Sheet and Paste to A New Workbook
    By Nathan123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2007, 09:24 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