PDA

View Full Version : I need help secure a workbook with a password



etheer
04-13-2013, 08:12 PM
Hi

I have vba code secure password for excel


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

when put wrong password out this messege

http://im38.gulfup.com/fu5yK.png

I need edit code do not out this messege or dont save

patel
04-13-2013, 10:35 PM
deteted_____________

HaHoBe
04-13-2013, 10:49 PM
Hi, etheer,

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 Ciao,
Holger