c# - weird COM behavior in VBA -
i have excel vba module calling c# com dll. sometimes, weird behavior i'm hoping might able explain. i'm getting type mismatch when step through debugger in vba, when initialize com object follows.
if (isempty(cm)) set cm = createobject("aimd.cmadaptor") end if now can add breakpoint in vba , add watch cm variable, , see type doesn't match instantiated. in fact, type property inside object i'm trying create... object pointed created "aimd.cmadaptor" object instantiated, don't root object specify, child.
since com object, i'm wondering if updates using mismatched regasm data or weird causes object in wrong place, or that. rebuilding debugging, , adding installer calls regasm build action.
thoughts?
turned out dumb mistake... copying attributes allow select name of class seen on vba side...
[progid("aimd.cmadaptor")]
this located in 2 different classes. apparently, no complaint when this. i'm not sure why picked 1 on other, after updating incorrect attribute, works fine.
Comments
Post a Comment