Question: Private Sub Enroll() Dim code As Long code = TextBox1.Value If 108000000 < code And code < 120000000 Then If TextBox2 = Welcome Then MsgBox
Private Sub Enroll() Dim code As Long code = TextBox1.Value If 108000000 < code And code < 120000000 Then If TextBox2 = "Welcome" Then MsgBox "Welcome." MsgBox "Enroll the classes." Sheet1.Activate Else: MsgBox "The password is wrong." MsgBox "Exit the log-in." End If Unload Me Else TextBox1.Text = "" MsgBox "Please write the id number again." End If End Sub
I wrote the code for VBA. but
there is comfile error: invalid use of Me keyword.
Please help me why it is wrong and fix it to me.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
