Private Sub Workbook_Open()
Dim pw
pw = InputBox("Please Enter The Password", "PassWord")
If UCase(pw) <> UCase(Trim("abc")) Then
Me.Close (savechanges = no)
End If
End Sub
On Oct 21, 8:56 am, Jai wrote:
> Dear Group member,
>
> please provide the VBA Code to protect the exc
Push Alt + F11 to open VBE in VBE go to Tools -> VBA Project
Properties -> Click on the Protection tab -> Enter password twice.
Click the box "Lock project for viewing" if you don't want someone to
see your code.
Click ok. Save the workbook and close out. The next you come back in
the VBA Project