An object reference is temporary and can easily become invalid between closing and opening a file. This error has the following cause and solution:
If the variable is an object reference you can't use it with Get and Put statements. To place the value of some or all of the object's properties in the file, each property must be individually specified.
If the variable's Type statement contains an element representing an object (for example, it is defined in a class module, has Object data type, is a form or a control, and so on), remove it from the definition, or define a new type for use with the Get and Put statements that has no Object type element in its definition.
If you have elements in the user-defined type with Variant type, make sure no object reference is assigned to that element. A Variant can accept such an assignment, but will cause this error if its user-defined type is used in a Get or Put.
Note that you can use Input #, Line Input #, Print #, or Write # to write the default property of an object to disk.
For additional information, select the item in question and press F1.