Consulting

Results 1 to 3 of 3

Thread: I need help secure a workbook with a password

  1. #1

    I need help secure a workbook with a password

    Hi

    I have vba code secure password for excel


    [VBA]Private Sub Workbook_Open()
    If Date > DateValue("1/3/2010") Then
    If InputBox("password ") <> "etheer" Then
    MsgBox "Wrong password"
    ThisWorkbook.Close
    Else
    MsgBox "Welcome"
    End If
    End If
    End Sub[/VBA]

    when put wrong password out this messege



    I need edit code do not out this messege or dont save
    Last edited by Aussiebear; 04-14-2013 at 12:17 AM. Reason: Added the correct tags to the supplied code

  2. #2
    VBAX Mentor
    Joined
    Jul 2012
    Posts
    398
    Location
    deteted_____________
    Last edited by patel; 04-14-2013 at 12:29 AM.

  3. #3
    VBAX Regular HaHoBe's Avatar
    Joined
    Aug 2004
    Location
    Hamburg
    Posts
    89
    Location
    Hi, etheer,

    [vba]Private Sub Workbook_Open()
    If Date > DateValue("1/3/2010") Then
    If InputBox("password ") <> "etheer" Then
    MsgBox "Wrong password"
    ThisWorkbook.Close False
    Else
    MsgBox "Welcome"
    End If
    End If
    End Sub[/vba] Ciao,
    Holger

Posting Permissions

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