jamienwood
Board Regular
- Joined
- Apr 14, 2002
- Messages
- 133
I have come up with the following code to protect a shhet from being opened unless you know the password. It all works, however the sheet is shown in the background while the password is entered, the question is does anyone know how to stop the sheet being shown in the background. P.S. the code goes on the page code, if anyone wants it feel free to copy it!!
Private Sub Worksheet_Activate()
OK = InputBox("Please Enter Your passwor", "Password")
If OK = 864 Then Sheets("Sheet3").Select
If OK <> 864 Then Sheets("Sheet1").Select
End Sub
the 864 is the password!
Private Sub Worksheet_Activate()
OK = InputBox("Please Enter Your passwor", "Password")
If OK = 864 Then Sheets("Sheet3").Select
If OK <> 864 Then Sheets("Sheet1").Select
End Sub
the 864 is the password!