Illegal use of sub

You defined a sub as a member of a class and then referred to that sub as though it were a member function, property, or variable. For example:

Class MyClass
   Sub MySub
   '...
   End Sub
End Class
Dim varV As Variant
Set varV = New MyClass
X = varV.MySub			' Illegal: a sub doesn't have a return value.
varV.MySub = 5			' Illegal: you can't assign a sub a value.

Remove the reference or redefine the sub as the appropriate type of class member.