Passwords
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Passwords

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    133
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Is it possible whilst running a macro to un-protect a password protected worksheet without the user being prompted to enter a password, then running whatever macro code has been written, then re-protecting the worksheet with the same password, again without the user being prompted for a password?

  2. #2
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The general syntax within your procedure could be something like:

    ActiveSheet.Unprotect ("PASSWORD")
    'Your code goes here
    ActiveSheet.Protect ("PASSWORD")

    Of course, modify for actual password characters.

    Tom Urtis

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    133
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Many Thanks Tom, it works well.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com