Hi Jimbo,
You could probably use something along the lines of the following, which would be linked to a commandbutton (or other object, change as needed) on userform1:
Private Sub CommandButton1_Click()
Dim mypw As String, userpw As Variant
mypw = "newform111"
userpw = Application.InputBox("Password needed to open Form 2", "Enter Password")
If userpw = False Then
Exit Sub
ElseIf userpw <> mypw Then
MsgBox "Sorry, incorrect password entered."
Else
UserForm2.Show
Unload Me
End If
End Sub
If it's important that users don't know this password, you should protect your VBA code in the VB Editor (Tools > VBA Project Properties > Protection > check Lock Project for Viewing and set a password).
Bookmarks