+ Reply to Thread
Results 1 to 4 of 4

Protect Workbook - prevent move/copy only

  1. #1
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Protect Workbook - prevent move/copy only

    Is there a way to password protect a workbook but still allow users to still right click a sheet tab and either rename it or delete it?


    I am basically trying to block the move/copy feature to prevent a sheet from being copied to a new workbook and the currently passworded VBA codes from being exposed.
    Last edited by PY_; 09-09-2010 at 01:13 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Protect Workbook - prevent move/copy only

    Hi PY,

    Run this line of code against your workbook and then save it:
    Please Login or Register  to view this content.
    The 'Move or Copy' option when right-clicking on a sheet tab will then be disabled (greyed out). As for protecting your VBA code and sheets, if it's built in Excel it can be outwitted in seconds (or minutes if you have to Google how first).

  3. #3
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Protect Workbook - prevent move/copy only

    Thanks Paul!

    I know it can be cracked, just trying to prevent the average user from changing something they shouldnt.

    Thanks again for the help!

  4. #4
    Forum Contributor PY_'s Avatar
    Join Date
    09-23-2008
    Location
    Houston
    MS-Off Ver
    Office 2016
    Posts
    289

    Re: Protect Workbook - prevent move/copy only

    Now that i have added the above to my current workbook. That disable of Move/Copy is true for ALL files i open/create.

    I have to add that code to my new workbook and set it to True, then run the code in order to have that ability again. The same is true for all future workbooks.

    How can i set the above statement so it only affects the single workbook it is located in rather than all files i open/create after opening the workbook containing that line of code?


    Maybe by making it False to workbook open and True to the workbook close? <-- I believe that fixed my problem.
    Last edited by PY_; 09-15-2010 at 10:19 AM.

+ 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