Exposing UDT's outside of an activex dll
One way is... not to use a UDT at all... Instead add a PublicNotCreatable
class module and define the public properties the same as the UDT you're
using
'========================
Form1 code
'========================
Option Explicit
Private Sub Form_Load()
Dim obj As Class1
Set obj = New Class1
With obj.UDT
Debug.Print .UDTElement1
Debug.Print .UDTElement2
Debug.Print .UDTElement3
End With
End Sub
'========================
Class1 code (Main body of dll) (Instancing:MultiUse)
'========================
Option Explicit
Public UDT As clsUDT
Private Sub Class_Initialize()
Set UDT = New clsUDT
UDT.UDTElement1 = "sdf"
UDT.UDTElement2 = 1
UDT.UDTElement3 = 4
End Sub
Private Sub Class_Terminate()
Set UDT = Nothing
End Sub
'========================
clsUDT code... your UDT (Instancing:PublicNotCreatable)
'========================
Option Explicit
Public UDTElement1 As String 'These become elements of the UDT
Public UDTElement2 As Integer
Public UDTElement3 As Double
'========================
Quote:
> How do I expose a UDT in my ActiveX DLL to be
> available in a client EXE ?
> Thanks