Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Vb's CreateObject Function

0 views
Skip to first unread message

Doug Asbury

unread,
Feb 22, 2001, 11:34:32 AM2/22/01
to
In VB you can create and return a reference to an ActiveX object by using
the CreateObject function.

For example:

Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")

Any ideas how to do this in Delphi? I am in the process of converting some
existing Vb6 code to Delphi 5 and this one has me stuck.

Thanks for any input.


Reddy Palle

unread,
Feb 22, 2001, 11:50:13 AM2/22/01
to

"Doug Asbury" <doug_...@cree.com>

> In VB you can create and return a reference to an ActiveX object by using
> the CreateObject function.

> Dim ExcelSheet As Object


> Set ExcelSheet = CreateObject("Excel.Sheet")
>
> Any ideas how to do this in Delphi? I am in the process of converting
some


var
ExcelSheet: OleVariant;
begin
ExcelSheet = CreateOleObject('Excel.Sheet');

ExcelSheet.?;

ExcelSheet = Null;
end;

-- Reddy Palle.

Doug Asbury

unread,
Feb 22, 2001, 12:35:48 PM2/22/01
to
That was simple. Thanks much for your lightning fast response.


0 new messages