
Option Explicit
Dim PassValue As Boolean
Private Sub Worksheet_Activate()
Dim Pass As String
If PassValue = True Then Exit Sub
'Me.Visible = xlSheetHidden
Application.ScreenUpdating = False
Foglio1.Select
Application.ScreenUpdating = True
Pass = InputBox("Inserisci la password x vedere il foglio")
If Pass = "PIPPO" Then
PassValue = True
Me.Select
Else
MsgBox "Password Errata", vbCritical
End If
End Sub
Private Sub Worksheet_Deactivate()
PassValue = False
End Sub
|
