code how to view microsoft visual basic (vba) using userform button not using short cut alt+F11 a code that run to view the admin vba code and can enable to access it and edit the code directly. A very big thanks who can help.
Private Sub btnOk_Click()
If TextBox1.Text = "user" And TextBox2.Text = "user" Then
'MsgBox "Login Successful"
Application.Visible = True
Unload Me
'---Open Module1
Application.VBE.MainWindow.Visible = True '////this line give me error
Else
MsgBox "You have entered wrong user id or password, please enter again!"
TextBox1 = ""
TextBox2 = ""
End If
End Sub
New contributor
HERBERT JAGDON is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
12