CreateObject

Public Function CreateObject(ByVal TypeName As String, Optional ByVal AssemblyPath As String) As Object

Creates an object of the given type. Used to create COM objects, but not needed for creating DotNet objects. DotNet object can also be created using the New keyword.

Dim MailObject = CreateObject("MyMailer.NewMail")
lMailObject.Sender = "myname@myprovider.com"
lMailObject.Recipient = "Recipient@theirprovider.com"
lMailObject.Subject = "Hello"
lMailObject.BodyText = "How do you do?"
lMailObject.Send

See also: