ATL COM object returns readable array with VBA but type mismatch with VBScript?
Posted on 2006-05-18
I have a COM object I wrote using Visual Studio 5 ATL.
It has a property whose get method returns an array of Doubles.
I can read the array just fine when I call it from a Visual Basic or VBA container.
But when I try to get the property using VBScript, using the WSH.WScript engine, I get a Type Mismatch error when I try to access it.
I ran the COM project in Debug mode using the VBScript in WSH as the driver, and I verified that it is returning an array (SAFEARRAY) of doubles values, but the values aren't visible to the driver. Again, this only happens in VBScript, but not straight VB or VBA.