I am trying to create individual passwords for multiple sheets in an excel workbook. I have successfully passworded the mastersheet but am struggling to password the individual worksheets. Please help this is where i am at:
Private Sub CommandButton1_Click()
If Me.TextBox1.Value = "master" Then
Unload Me
Sheets("Sheet4").Visible = True
Sheets("Sheet5").Visible = True
Sheets("Sheet1").Select
Else
If Me.TextBox1.Value = "derby" Then
Unload Me
Sheets("Sheet6").Visible = True
Sheets("Sheet7").Visible = True
Sheets("Sheet1").Select
Else
Me.Hide
Retry = MsgBox("The password is incorrect. Do you wish to try again?", vbYesNo, "Retry?")
Select Case Retry
Case Is = vbYes
Me.TextBox1.Value = ""
Me.TextBox1.SetFocus
Me.Show
Case Is = vbNo
Unload Me
Bookmarks