+ Reply to Thread
Results 1 to 3 of 3

Re: Using Macro to protect and unprotect worksheets

  1. #1
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: Using Macro to protect and unprotect worksheets

    I installed these macros on a sample workbook and they function properly. When I run the protect macro all the pages are protected properly and visa versa. So how does the password function work?

    Code located at: http://www.excelforum.com/excel-prog...ml#post2285150
    Last edited by Paul; 04-09-2010 at 01:45 AM.

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

    Re: Using Macro to protect and unprotect worksheets

    Simpson, in the future, please start your own thread. If another thread is relevant, provide a link as I've added to yours.

    "Password" is not a function, it's a property of the Protect and Unprotect methods. The password can be set or changed in the Protect method. If you leave off "Password:=..." then the worksheet will become protected, but with no password.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using Macro to protect and unprotect worksheets

    Simpson, expanding on what Paul has already shown you, the macros on this page show you how you can allow the USER to decide the password at the time the PROTECT macro is run. It also shows how the user can be prompted to provide you the password to unprotect them. Perhaps it will be of use to you:

    Protect & Unprotect all sheets in a workbook
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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