I have a Workbook by name "archive" which I am hiding. When opening the workbook, a UserForm pops and asks for password. If the correct password is entered another form opens. The problem is that when the password form opens after clicking on the workbook, I cannot open any other workbook. It seems like all workbooks are hidden and they only open if I enter a password. The code I use is:
Private Sub commandbutton2_click()
If TextBox1.Value = "Secret" Then
MsgBox "Welcome", vbExclamation, "Access granted"
Me.Hide
UserForm1.Show
Else
MsgBox "You have entered an incorrect password!"
Unload Me
End If
End Sub
UserForm_Initialize()
for the first userform? if yes then what do you have in it – Arun ThomasWorkbook_Open
event is showing the password form modally, but that's just a guess since you didn't show enough code to reproduce the issue. – Tim