Password button and userform
问题 I have programmed the following userform in Excel VBA: Private Sub CommandButton1_Click() Password = TextBox1.Text If Password = a Then MsgBox "Password Correct.", vbInformation Unload Me Else MsgBox "Password Incorrect. Please try again.", vbCritical End If End Sub The password variable a = "test" This password userform itself works perfectly. Now I want to connect it to a button that is already in the sheet. The code behind this button is in the section "ThisWorkbook" in the VBA editor: Sub