Open ThunderFrame opened 7 years ago
Given there's no compile error with Set foo = New Workbook
, I like the inspection... but I don't think the quickfixes would be realistic, there's just too many edge cases. Even for a Workbook
, the Workbooks
collection could be owned by anotherApplication
instance.. not to mention cases where the Excel object model is referenced from another host.
We could have an error-level inspection result for it, but there wouldn't be a quick-fix for it. (not even ignore once?)
Some CoClasses don't have public constructors, so VBA can't New 'em up.
The quickfix would require knowing the factory method(s) and be host/TLB specific.