Public Property Get

TukiLaLa

New member
Public Property Get

אם יש לי פונקציה כזאת שאני שם בפקד activeX אז איפה אני שם אותה ואיך אני קורא לה???? Public Property Get adresstext() As String Dim s As String s = Text1.Text & vbCrLf s = s & Text2.Text & vbCrLf s = s & Text3.Text & vbCrLf Text4 = s End Property
 

Lucciano

New member
...

you cannot do the text4=s in the property. what you should do is return the s from the property like this:
adresstext = s​
after that you should write the following code in your project
'add a reference in your project to your ActiveX, 'and after that create an instance of it Dim objAX as YourAXName Set objAX = New YourAXName 'now, you can do the following: text4.text = YourAXName.adresstext 'now, release the pointer Set YourAXName = Nothing​
 

Lucciano

New member
Important!

Your Property should be contained in a Class, and the instanciation should be performed on the class.​
 
למעלה