+ Reply to Thread
Results 1 to 4 of 4

Macro Protecting Sheets with Password

  1. #1
    Registered User
    Join Date
    01-23-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Macro Protecting Sheets with Password

    So I am trying to code in a macro to protect and unprotect the sheet when users are entering in certain data. Everytime I try to add the password to the protect line it seems to give me an error.

    Please Login or Register  to view this content.
    If I remove all the variables (drawing objects, contents etc...) it will allow me to add Password:="pass" but not with the variables. How do I keep it so that it protects the way I want it too, but with a password?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro Protecting Sheets with Password

    Have you tried
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-23-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro Protecting Sheets with Password

    I'm not sure why but your code seems to work, but it is exactly what I have been trying. Are there other ways to protect and unprotect the sheet then that line of code?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro Protecting Sheets with Password

    You can use ProtectWithUserInterface, see here

+ 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