Sorry, I would need a password (for lack of a better word text box) to show upon loading the userform. If the password is correct the user can proceed to sheet 3 or use the userform, if not they will stay at the user form and proceed with their data entry not being able to ever see sheet 3. They would then click the provided EXIT button and that takes them out of the program. What I have so far isn't getting the job done as far as the password on the userform. THANK YOU!
Sub HideSheets()
'Set worksheet to Very Hidden so that it can only be unhidden by a macro
Worksheets("Sheet3").Visible = xlSheetVeryHidden
Const pWord = "MyPassword"
End Sub
Sub ShowSheets()
'Prompt the user for a password and unhide the worksheet if correct
Select Case InputBox("Please enter the password to unhide the sheet", _
"Enter Password")
Case Is = pWord
With Worksheets("Sheet3")
.Visible = xlSheetVisible
.Activate
.Range("A1").Select
End With
Case Else
MsgBox "Sorry, that password is incorrect!", _
vbCritical + vbOKOnly, "You are not authorized!"
End Select
End Sub
Bookmarks