Types in Add-In
Am Thu, 21 Oct 2004 05:35:56 -0700 schrieb keepITcool
:
Assume:
I've an addin who's projectname is "PROXL"
in the addin i've a Public module
(check it does NOT contain :
'disabled: Option Private Module
Public Type udPrinter
Name As String
Port As String
End Type
Public Function GetP() As udPrinter
GetP.Name = "Aaap"
GetP.Port = "LPT1"
End Function
In the caller you must add a reference to
the addin. = ADD a reference to "PROXL" !!!!
I've setup a reference to the XLA, since I can call other methods from the
addin.
Sub foo()
Dim x As PROXL.udPrinter
x = PROXL.GetP
End Sub
works for me.
Could it be, that passing the type "ByRef" causes the problem? Does Excel
try to convert the type to variant when calling the XLA? But I need the
ByRef, since I need this parameter as a return-value of the methode.
|