-
Notifications
You must be signed in to change notification settings - Fork 299
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Inspection: Invalid use of member #2189
Comments
Might be I'm blind, but I don't see the problem with the snippet there. Did you mean to make a |
Oh duh |
Nevermind |
Now that we have the MemberNotOnInterfaceInspection (that doesn't pick this up), I'd classify this as a bug as opposed to a feature request. |
Personally, I'm a bit surprised that the sample syntax for UserForm would cause runtime errors. That is not the same behavior with the Access form. Dim MyForm As Access.Form The We have similar situation with So I agree with @comintern that it should be picked up by the MemberNotOnInterface inspection, to warn the users to revise their declaration or to do explicit cast to the specific type. Note that explicit cast wouldn't even apply to the |
Also a bit like the Application.Sum function in Excel. IIRC, COM marks the interface as |
When working with interfaces and base types, VBA can compile code that will fail at run-time.
Rubberduck should try to identify such problems at inspection-time.
UserForm1
has the following propertyThe text was updated successfully, but these errors were encountered: