+ Reply to Thread
Results 1 to 3 of 3

Protect specific worksheet and workbook in the same workbook

  1. #1
    Registered User
    Join Date
    07-20-2018
    Location
    Hong Kong
    MS-Off Ver
    2007
    Posts
    60

    Protect specific worksheet and workbook in the same workbook

    Dears,

    Is it possible to protect specific worksheet and workbook in the same workbook with VBA?

    Regards,

    Oliver

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: Protect specific worksheet and workbook in the same workbook

    Yes, why wouldn't it be? What is it you are trying to achieve? If you want a specific solution, you will need to provide a lot more detail.

    Easiest way to start is to record a macro while you protect a specific worksheet ( with the specific options you require ) and then protect the workbook.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    07-20-2018
    Location
    Hong Kong
    MS-Off Ver
    2007
    Posts
    60

    Re: Protect specific worksheet and workbook in the same workbook

    Dear TMS,

    Too complicated.
    1. The master workbook is a shared workbook for our logistics colleagues to record the engineer's parts information. When the logistics colleague saves the workbook, the slave workbook is created and saved to another location for the engineer to use. In addition, the master workbook has a password when opened
    2. When opening the slave workbook, one column in the worksheet is hidden. Except for the filtering function, the other columns are all locked (worksheet protect). The slave workbook does not require a password when it is opened.

    One of the point is that, if "enable macro button" is not click, VBA is off then the user can see everything. So, I want to write the VBA for above.

    Below is my VBA, it works, but it doesn't feel like this. Can you help to check it?




    Please Login or Register  to view this content.
    Last edited by oliverliu2; 08-03-2020 at 05:10 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. Have workbook open specific worksheet when workbook opens
    By snuffnchess in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-15-2016, 07:39 PM
  2. Replies: 5
    Last Post: 09-25-2015, 10:32 AM
  3. Macro to Copy/Paste History in specific worksheet, password protect workbook
    By gaker10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2015, 02:58 PM
  4. How to copy data from one workbook to a specific worksheet of another workbook
    By VidyaVallaba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2014, 03:44 AM
  5. Call a specific workbook from a file location and move worksheet to different workbook
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2014, 01:46 AM
  6. [SOLVED] Passwords Disappear in OpenOffice (Protect Worksheet, and Protect Workbook)
    By msnews.microsoft.com in forum Excel General
    Replies: 6
    Last Post: 12-27-2005, 04:20 AM
  7. Replies: 5
    Last Post: 08-09-2005, 11:05 AM

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