tags:

views:

36

answers:

1

Hi,

Can somebody please tell me how to pass a VBA user defined type to a c++ (dll). I specially need to know how to handle string type of VBA in the dll.

Thank You

A: 

Variable-length string members are passed as BSTR. Fixed-length string members are passed as arrays of CHAR containing ANSI strings.

There is an exhaustive sample in the Microsoft documentation here. This was originally written for VB5 but it also applies to VBA.

MarkJ