SET required on class instance assignment (message explained)
You attempted to assign an object reference to a variable but omitted the Set keyword. (An object reference can be a reference to an instance of a user-defined class, a product object, an OLE automation object, or the constant NOTHING.) The Set keyword is required in object reference assignments. For example:
Class MyClass
' ...
End Class
Dim MyObj As New MyClass
Dim varV As Variant
varV = MyObj ' Illegal syntax
Insert the Set keyword in the assignment statement:
Class MyClass
' ...
End Class
Dim MyObj As New MyClass
Dim varV As Variant
Set varV = MyObj ' Legal syntax