Object variable or With block variable not set (Error 91)

   

There are two steps to creating an object variable. First you must declare the object variable. Then you must 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. This error has the following causes and solutions:

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).