Error 424, “Object required”, means a line uses a property or method on something that isn’t an object, or uses Set with something that isn’t one. VBA expected a range, sheet, workbook or similar, and got an empty variable or a plain value.
The usual cause is a misspelt name. After Set target = Range("A1"), the line traget.Value = 5 refers to a new, empty variable that isn’t an object. Put Option Explicit at the top of the module, and VBA flags the misspelling as “Variable not defined” before the code runs.
The other common cause is Set with a value instead of an object. Set rng = Range("A1").Value fails because .Value returns the cell’s contents; write Set rng = Range("A1"). Set is only for objects, so assign plain values such as numbers and text without it.
On a UserForm, the error usually means a control name in the code doesn’t match the form, such as TextBox1 after the box was renamed txtName. Check the name in the control’s Properties window.
To find the line, click inside the macro and press F8 to step through it; the line that stops is the one using an object that isn’t there. Don’t skip the error with On Error Resume Next, which hides it and leaves the code working on nothing.
When VBA is not able to recognize the object whose property or method you are referring to, it shows you the Object Required error. In simple words, if you refer to an object, but the name of that object is not correct (that object is not in VBA’s object hierarchy), it shows error 424, like the following.

In the above code, as you can see, I have misspelled the active cell object, and when VBA executes that line of code, it can’t find that object because there’s no object with that name (as I have misspelled it). VBA treats the misspelled name as a new, empty variable, and an empty variable doesn’t have any properties or methods.
Note: If you have used VBA’s Option Explicit statement in the module, then with the same code, you’ll get a different error: the “Variable not defined” compile error (see image below). That’s a good thing, as VBA points out the misspelled name before the code even runs.

Used the “Set” Keyword for a Non-Object Variable
When you use a variable to assign an object to it, you need to use the keyword “Set”. In the following example, you have myWKS for the worksheet and iVal for the value from cell A1.

As you can see, in the above code, you have two variables: one is declared as a worksheet object and the second as a string. But at the time of assigning the value, we have used the “Set” keyword with the variable “iVal”, which is not declared as an object but as a string.
To fix it, remove the “Set” keyword from that line. You need “Set” only to assign an object (like a worksheet or a range), and a normal value (a string, a number or a date) is assigned without it:
Sub myMacro()
Dim myWKS As Worksheet
Dim iVal As String
Set myWKS = Worksheets("Sheet1")
iVal = myWKS.Range("A1").Value
MsgBox iVal
End Sub
Other Causes of the Object Required Error
Apart from a misspelled name and the “Set” keyword, here are a few more situations where you can get error 424:
- Using a sheet or control name that VBA doesn’t know: If you write the name of a sheet (like Sales.Range(“A1”)) or a control (like TextBox1.Value) in a module where VBA can’t find it, VBA treats it as an empty variable. Use Worksheets(“Sales”) for a sheet, and refer to a control with its sheet or UserForm, like UserForm1.TextBox1.Value.
- Using a value as if it were an object: If a variable holds a value from a cell (like a number or text) and you use a property or method with it (like myValue.Select), VBA shows the error, because a value doesn’t have properties.
- Assigning a value with “Set”: A line like Set myRange = Range(“A1”).Value tries to store the cell’s value as an object. Use Set myRange = Range(“A1”) to store the range itself.
- Forgetting “Set” with a Variant variable: If a variable is declared without a type (or as Variant) and you assign an object to it without “Set”, VBA stores the object’s default value instead (like the cell’s value). There’s no error on that line, but the next line that uses the variable as an object shows error 424.
How to Fix Object Required (Error 424) in VBA
- Go to the Debug menu in your Visual Basic Editor.
- Use Step Into (or press F8) to run the code line by line.
- The moment you reach the line where you have an error, VBA will show you the error message.
- Correct that line of code.

The other way could be going through the code line by line, reading it to make sure you are referring to the right objects and using the correct names of the variables and objects.
You can also use an error handler (On Error GOTO) to skip an error or show a message to the users once an error occurs.
And to catch most of these mistakes before you run the code, add Option Explicit at the top of every module (or tick “Require Variable Declaration” in Tools ➤ Options, so VBA adds it to new modules). With it, VBA flags any misspelled object or variable name as soon as you compile or run the code.
Frequently Asked Questions
What Is the Difference Between Error 424 and Error 91?
Error 424 (Object required) means VBA expected an object but got something that isn’t one, like a misspelled name or a value. Error 91 (Object variable or With block variable not set) means you have an object variable, but no object is assigned to it yet, usually because you forgot “Set” or a Find returned Nothing.
Why Does Error 424 Show Up as a Compile Error Sometimes?
When VBA can tell the problem from the code itself, like using “Set” with a variable declared as a String, it shows “Compile error: Object required” before the code runs. When the problem shows up only while the code is running, like a misspelled name without Option Explicit, you get “Run-time error ‘424’”.
Does Option Explicit Fix Error 424?
It doesn’t fix the code for you, but it turns a misspelled object name into a “Variable not defined” compile error and highlights the name, so you can find and correct it quickly.
Written by
Puneet Gogia
Microsoft MVP — Excel · Founder, Excel Champs
Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.