I'm Attempting to create a ActiveX OCX with a single textbox object. Within the OXC, I am defining a public function to expose the properties of the textbox to the calling form. Code example:
Public Function Get_TextBox() As TextBox
Set Get_TextBox = Text1
This results in the following VB 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"
Are there any easy ways to expose the Activex objects by using a public function that returns the object without having to code methods that return all of the objects' properties and methods?