Converting a vb.net dictionary to a vba dictionary

前端 未结 1 1866
不思量自难忘°
不思量自难忘° 2021-01-24 09:44

I was pleased to find that I could call structs that I had set up in vb.net straight into excel vba - using COM visible and registering using regasm.exe.

I am strugglin

相关标签:
1条回答
  • 2021-01-24 10:41

    Hans Passant's solutions in the comments above perfectly solved the problem:

    In VB.net, either use:

    Public Function ReturnDict() As System.Collections.IDictionary
    

    or reference scrrun.dll and:

    Public Function ReturnDict() As Scripting.Dictionary
        Dim dict As New Scripting.Dictionary
    

    The latter solution provides a VBA dictionary that can be used as one would like.

    0 讨论(0)
提交回复
热议问题