Article ID: 143041
Article Last Modified on 6/29/2004
129801 How To Create and Use a Minimal OLE Automation Server
Sub CallServer()
Dim MyObj As Object
Set MyObj = CreateObject("Project1.Class1")
MsgBox MyObj.MyString
MsgBox MyObj.MyFunction()
Set MyObj = Nothing
End Sub
Note the parentheses following the line MsgBox MyObj.Myfunction(). The
parentheses are not required when calling an OLE Server from Visual
Basic 4.0, but they are required when you call an OLE Server from Excel
5.0.
Keywords: kbhowto kbinterop kbprogramming KB143041