CREATEOBJECT

Microsoft Office Spreadsheet Functions

CREATEOBJECT

See Also

Returns an instance of an IDispatch object with the given ProgID. This function allows you to create any COM object that you have either on your local computer or running remotely on the designated server.

Syntax

CREATEOBJECT(ProgID, ServerName)

ProgID   is the identifier of the IDispatch object.

ServerName   is the name of the server from which you want to obtain the IDispatch object. If omitted, the local computer name is used.

Example

Note   The example shown uses a fictional ProgID and ServerName.

A Description (Result)
1 =CREATEOBJECT("msn.marketdata", "\\investor") Returns IDispatch object for stock data from the investor server.
2 =OBJECT($A$1).LastPrice("MSFT") Returns last price of stock from information contained in object returned in cell A1.