Name
CreateObject Function — Microsoft.VisualBasic.Interaction
Synopsis
objectvariable
= CreateObject(progid
[,servername
])
objectvariable
required; ObjectA variable to hold the reference to the instantiated object
progid
required; StringThe programmatic identifier (or ProgID) of the class of the object to create
servername
optional; StringThe name of the server on which the object resides
Named Arguments
No
Return Value
A reference to a COM or ActiveX object
Description
Creates an instance of an OLE Automation (ActiveX) object.
Prior to calling the methods, functions, or properties of a COM or ActiveX object, you are required to create an instance of that object. Once an object is created, reference it in code using the object variable you defined.
Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.