Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions