Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Basic
Error Messages
Run-Time Messages
 Object variable or With block varia...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Basic Reference: Error Messages 
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.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker