Article ID: 170946
Article Last Modified on 7/1/2004
Sub Main ()
NOTE: End Sub will be added automatically for you.
Public MyString As String
Public Function MyFunction() As String
MyFunction = "You never know what you're gonna get."
End Function
Public Sub Class_Initialize()
MyString = "Life is like a box of chocolates."
End Sub
Property Value
------------------------------------
Instancing 5 - MultiUse
' In the General Declarations section:
Private MyObj As Object
Private Sub Form_Load ()
Set MyObj = CreateObject("Project1.Class1")
End Sub
Private Sub Form_Click()
Print MyObj.MyString
Print MyObj.MyFunction
End Sub
Private Sub Form_Unload (Cancel As Integer)
Set MyObj = Nothing
End Sub
129801 : How To Create and Use a Minimal OLE Automation Server
Additional query words: OLE Server KBSERVER KBACTIVEX kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport
Keywords: kbhowto kbgrpdsvb KB170946