Please help with my runtime error '424' object required

ashley12

New Member
Joined
Dec 6, 2020
Messages
43
Office Version
  1. 365
Platform
  1. Windows
Here is my code:

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$E$70" Then
        If Me.Range("E70") = "Yes" Then
            If Me.Range("E9") = "" Then
                MsgBox "Please enter school ID at the start of the form to continue"
                Me.Range("E70") = ""
            Else
                Personnel_form.Show
            End If
        End If
     End If
End sub

The debuger pointed at "Personnel_form.Show". It's to show my userform.

Would appreciate your help. Thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
The error is basically saying it cannot locate your user form. Is it spelled correctly? Is it in the same wordbook as the code?
 
Upvote 0
The error is basically saying it cannot locate your user form. Is it spelled correctly? Is it in the same wordbook as the code?
Hi AlhaFrog. Yes, that was the first thing I thought of. I copied and paste the name of the form so make sure the spelling correct (as screenshot below). I tried switching the name with other forms and it works. I'm not sure what else can go wrong.

1611710700191.png
 
Upvote 0
As a test, can you run Personnel_form manually without error?
Oh I never thought of doing that. No it doesn't run. It shows the same error, as if the form didn't exist. But it's right there. Do you know what might have happened?
 
Upvote 0
Something in your user form code in preventing it from initializing. Put breakpoints in the code and see if you can locate it.
 
Upvote 0
Solution
Thank you so much. I found it. Turns out I changed name of some ComboBoxes without doing the same for form initialization part
 
Upvote 0

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top