PDA

View Full Version : IDispatch is not working inside a Type



kcvinu
11-04-2021, 21:22
IDispatch is not working inside a Type


Type tList
pList As IDispatch '\\ It works if i put this outside the type block.
Function _Create()
Me.pList = NewCom("Scripting.Dictionary")
End Function
End Type
Dim myList As tList

Result - Error
Description - Something is incorrect. A keyword is not supposed to be present in the current position. See error Additional Info area for indications about which keyword is producing this error.
Line Code : Me.pList = NewCom("Scripting.Dictionary")
Do i miss something ?

Petr Schreiber
23-04-2021, 09:57
Hello,

this functionality is currently not supported. As help file for the topic TYPE (or UDT User Defined Types) mentions, supported as numeric, string, variant types + other user defined types and unions.

iDispatch is not currently available.

I just did adjustment to the docs to make it more explicit, will be present in next release.


Petr