The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Object variable or With block variable not set

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

  1. Make sure the object variable references a valid object, and specify or respecify a reference for the object.

  2. Make sure you did not use an object variable set to Nothing.

  3. Make sure the object library in which the object has been described has been selected in the Add References dialog box.

  4. Make sure your With block is initialized by executing the With statement entry point.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft