CreateObject Function

Syntax

CreateObject(Class$)

Group

Object

Description

Creates a new object of type Class$. Use Set to assign the returned object to an object variable.

Sandbox

Sandbox mode blocks this function.

Parameters Description
Class$ This string value is the application registered class name. If this application is not currently active, it is started.

See also

Objects


Sub Main
    Dim App As Object
    Set App = CreateObject("WinWrap.CppDemoApplication")
    App.Move 20,30 ' move icon to 20,30
    Set App = Nothing
    App.Quit       ' run-time error (no object)
End Sub