Looking at the below site:
1.
http://www.mrexcel.com/forum/excel-q...nd-button.html
I want to know how can one have multiple password options for the button. For example, "bigdog" as well as "shoes" as well as "deskchair". I tried commas and Or but I get an errorPrivate Sub CommandButton1_Click() Dim pword As String pword = InputBox("Please enter the password", "Password Required") If pword <> "bigdog" Then MsgBox "Yo...You aren't allowed to do that!", vbCritical + vbOKOnly, "Get Outta here!" Exit Sub Else MsgBox "proceed" ' Your code here End If End Sub
Also:
2.
Looking at the below code:
How can one have more than one password? For example, "yoyo3" as well as "curtainthread" as well as "mountaintree"Private Sub CommandButton1_Click() If TextBox1.Value = "yoyo3" Then Unload Me UserForm2.Show End If If TextBox1.Value <> "yoyo3" Then MsgBox "Sorry wrong password" TextBox1.Value = "" Exit Sub End If End Sub
Thanks!
Bookmarks