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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!