hello
I need help to fix the error , what I want if I select sheet <> stock then show inputbox and enter the password to show the sheet , but it gives error compile erro in this line
If Application.InputBox("Enter Password", "Password") & LT;> "airplane" Then
this is the code
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim Num As Integer
If Pwd = "" Then
If Sh.Name <> "stock" Then
Num = ActiveWindow.Index
Windows(Num).Visible = False
If Application.InputBox("Enter Password", "Password") & LT;> "airplane" Then
MsgBox "Incorrect Password", vbCritical, "Error"
Application.EnableEvents = False
Sheets(PvSh).Select
Application.EnableEvents = True
Else
Pwd = "airplane"
End If
Windows(Num).Visible = True
End If
End If
End Sub
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
PvSh = Sh.Name
End Sub