An invalid variable is being referenced. To create an object variable, declare the object variable and then assign a valid reference to the object variable using the Set statement. Similarly, a With...End With block must be initialized by executing the With statement entry point.
To correct this error
-
Make sure the object variable references a valid object, and specify or respecify a reference for the object.
-
Make sure you did not use an object variable set to Nothing.
-
Make sure the object library in which the object has been described has been selected in the Add References dialog box.
-
Make sure your With block is initialized by executing the With statement entry point.
See Also