Hello Everyone,
Have some tabs in the multipage control password protected so that when user attempts to select that tab, they are required to submit a password (unless they have done so already [correctly] and their authority level is stored as a public variable (like a session variable in asp.net
Here is code I use so far, but user can see content of protected tab during password enter. Is there anyway to show a tabe but hide the page section of a specific multipage page?
Maybe overlay a tabstrip control?
Dunno what would be best
SecurityCheck is the public variable
Private Sub MultiPage1_Change()
If MultiPage1.Value = 1 And SecurityCheck = False Then
MultiPage1.Value = 0
GoTo PasswordCheck
Else
MultiPage1.Value = 1
End If
Exit Sub
PasswordCheck:
Dim password As String
Dim correct_password As String
correct_password = "wsadmin"
password = InputBox("Please enter administrator password", "Password Required")
If password <> correct_password Then
MsgBox "Wrong password"
Sheet1.Admin_View_Button.Value = False
MultiPage1.Value = 0
Exit Sub
Else
SecurityCheck = True
GoTo AccessGranted:
End If
Exit Sub
AccessGranted:
MultiPage1.Value = 1
End Sub
Thank you
Bookmarks