+ Reply to Thread
Results 1 to 4 of 4

Thread: Macro Recorder didn't record my password

  1. #1
    Registered User
    Join Date
    02-22-2010
    Location
    Solihull
    MS-Off Ver
    Excel 2003
    Posts
    14

    Macro Recorder didn't record my password

    I started the macro recorder, selected Sheet1, Protect, Password then Sheet 2 and repeated. Read the script and no mention of the code for password on and password text!

  2. #2
    Forum Moderator dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003 & 2007
    Posts
    3,714

    Smile Re: Macro Recorder didn't record my password

    Good morning beegeeblueboy
    Quote Originally Posted by beegeeblueboy View Post
    I started the macro recorder, selected Sheet1, Protect, Password then Sheet 2 and repeated. Read the script and no mention of the code for password on and password text!
    ..and therre's very good reason for that - think about it.

    Use this to protect and unprotect with a password :
    ActiveSheet.Protect Password:="mypass"
    ActiveSheet.Unprotect Password:="mypass"
    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    02-22-2010
    Location
    Solihull
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro Recorder didn't record my password

    Quote Originally Posted by dominicb View Post
    Good morning beegeeblueboy

    ..and therre's very good reason for that - think about it.

    Use this to protect and unprotect with a password :
    ActiveSheet.Protect Password:="mypass"
    ActiveSheet.Unprotect Password:="mypass"
    HTH

    DominicB
    Thanks for the code Dominic.

    Whilst I appreciate what you say protecting the project would stop someone reading the script.

  4. #4
    Forum Moderator dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003 & 2007
    Posts
    3,714

    Smile Re: Macro Recorder didn't record my password

    Hi beegeeblueboy
    Quote Originally Posted by beegeeblueboy View Post
    Whilst I appreciate what you say protecting the project would stop someone reading the script.
    Only if you protect the code, but even if you did, TBH it's not that difficult to get into a locked VBA project. If we're going down that route, it's even easier to remove sheet protection.

    Excel security is lousy. If secrecy / locking things down is of paramount importance, don't use Excel.

    DominicB

+ 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.2.0