Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Password protection protection!

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have some password protected worksheets which need to be shared with various users to enter data. Sometimes people find it ammusing to change the password! Is there a way I can stop them from changing the password?

    Any help please as it takes hours to crack the password and I can't stop people doing it!

    [ This Message was edited by: Andy Gee on 2002-02-27 07:08 ]
    0 0
     

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Follow this link. The file at this site will crack a sheet's password pronto (less than 1 min.)

    http://www.straxx.com/excel/password.html

    Cheers, Nate

    [ This Message was edited by: NateO on 2002-02-27 08:03 ]
    0 0
     

  3. #3
    MrExcel MVP Joe Was's Avatar
    Join Date
    Feb 2002
    Location
    Central Florida, USA
    Posts
    7,539
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    I put form buttons on the sheet to lock and unlock, the password is hardcoded into the VBA code and hidden. This way the user cannot change the password.

    This code gos on the sheet module:

    Private Sub Worksheet_Change(ByVal Target As Range)
    '
    ' Macro by Joseph S. Was
    '
    Application.EnableEvents = False

    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="admin"
    Application.EnableEvents = True
    End Sub

    This code gos on the module:

    Sub myUnLock()
    'This code will unprotect the sheet.
    Application.EnableEvents = False
    Application.DisplayAlerts = False
    ActiveSheet.Unprotect ("admin")

    'Add optional code here!

    Application.EnableEvents = True
    Application.DisplayAlerts = True

    End Sub

    This is a very simple form of this.
    If this is the route you want to try, I have some very complex systems? JSW

    [ This Message was edited by: Joe Was on 2002-02-27 08:58 ]
    0 0
     

  4. #4
    New Member
    Join Date
    Feb 2002
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This is very usefull and I'm sure I'll use it in the future but it dosent help with those folks changing the main password when they save the workbook. Is there a way I could disable the 'save as' option? thus bypassing the point where the canges to the password can be made?
    0 0
     

  5. #5
    Guest

    Default

    Andy,

    Use the code below (open VBE and place in "Thisworkbook" object):

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, cancel As Boolean)
    If SaveAsUI Then
    cancel = True
    End If
    End Sub

    This prevents users from using "Save As" with this file, thus not allowing them to change the password. Hope this helps.

    Aloha!

    p.s. Also, be sure to password protect your vba code so that people can't go into VBE and disable this. (VBE Menu Bar: Tools | VBAProject Properties, Protection tab).

    0 0
     

  6. #6
    New Member
    Join Date
    Feb 2002
    Location
    ]-[ /-\ \/\/ /-\ | | ~~~@|_()]-[/-\!!!
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Andy,

    That last post was from me. (Just testing to see why my name appeared as anonymous when I was logged in!)

    Aloha!
    0 0
     

  7. #7
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,450
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Wasssuuupp Hawaiian!

    What island you on?

    Brian
    0 0
     

  8. #8
    New Member
    Join Date
    Feb 2002
    Location
    ]-[ /-\ \/\/ /-\ | | ~~~@|_()]-[/-\!!!
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    waaaaaazuuuup boo,

    Oahu...good to see fellow kamaaina here!

    Aloha!
    0 0
     

  9. #9
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Follow NateO's suggestion,That is the way I did it and it works.Trust me.
    0 0
     

  10. #10
    Board Regular
    Join Date
    Jun 2002
    Posts
    207
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hey Joe, can you tell me how to use the form button to lock and unlock? Thanks.
    0 0
     

Some videos you may like

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
  •