I have an activex dll with a function that needs to return a TXTextControl object.
I can get it returned if I set the return type on the function to Object. However if I set the return type to TXTextControl (which is what I would think the type should be), I receive the compile error listed below. Here is the function, the line that calls the function, and the error:
What am I missing?
I can get it returned if I set the return type on the function to Object. However if I set the return type to TXTextControl (which is what I would think the type should be), I receive the compile error listed below. Here is the function, the line that calls the function, and the error:
Code:
Public Function GenerateTestDocument(strTestCode As String) As TXTextControl
BuildDocument strTestCode
Set GenerateTestDocument = frmTxc.txc
End Function
Set frmTestTxc.txc = pe.GenerateTestDocument(txtTestCode.Text)
Compile error:
Private object modules cannot be used in public object modules as parameters or return types for public procedures, as public data members, or as fields of public user defined types
What am I missing?