I am trying to stop the navigation and password request of a command button happening when the specified criteria are meet ==If Sheets("NMLists").Range("r5") = "NM 4" Then== . However if the criteria are not meet then i need the password and navigation function to continue.
Help as always greatly appreciated.
Kristan
Private Sub CommandButton4_Click()
If Sheets("NMLists").Range("r5") = "NM 4" Then
Worksheets("navigation").Select
Else
End If
Set Password = Sheets("NMLists").Range("z5")
If InputBox("Please Enter the Password" _
, "Enter Password") _
<> Password Then
Sheets("Navigation").Select
Else
CommandButton4.Caption = Sheets("NMLists").Range("r5")
Worksheets("NM 4").Select
Me.Visible = True
End If
End Sub
Bookmarks