# %CoCreateObject interface

Call to create a COM Object.

## Syntax

```
retcode = %CoCreateObject(Param1, Param2, Param3)
```

## Parameter(s)

| Param1 [in] | CAutoCTRL handle. |
| --- | --- |
| Param2 [in] | ProgID name (for example, Excel.Application.8). |
| Param3 [out] | Dispatch object containing the IUnknown interface. |

## Returns

A Boolean (Success or Fail)

## Error Handling

Call CoGetException to get an error description.

## See also

- [Using the COM interface to FlashBASIC](https://d3codex.com/pickbasic-flashbasic/using-the-com-interface-to-flashbasic/)
- [FlashBASIC automation application interfaces](https://d3codex.com/pickbasic-flashbasic/flashbasic-automation-application-interfaces/)

---
Source: https://d3codex.com/pickbasic-flashbasic/cocreateobject-interface/ - part of the D3Codex reference.
