VBA password protected project not opening userfor

2019-09-15 02:33发布

I am facing problem while opening userform after protecting VBA project with password.

I have a button in Excel and when click, it access below function from module and open UserForm2

Sub Button1_Click()
    UserForm2.Show
End Sub

In UserForm2, I have optionbutton and when I click it, it open UserForm2 and hide UserForm1. It is working fine if I don't protect VBA project but if I protect it with password, it open only UserForm2 and when I click optionbutton, it does not open UserForm1.

Private Sub OptionButton1_Click()
    UserForm2.Hide
    UserForm1.Show
End Sub

0条回答
登录 后发表回答