Board index » delphi » Calling VBA commands inside Delphi

Calling VBA commands inside Delphi

Hi,

I wrote procedure that transfers data from dbgrid to Excel
At the end I want to display a message
My question is how can I call Msgbox function in Delphi

Thanks.

 

Re:Calling VBA commands inside Delphi


<<Haci Fehmi Ozgun:
My question is how can I call Msgbox function in Delphi

Quote

To use Excel's MsgBox function, create a macro like this:
Sub MyMsgBox(Msg As String)
  MsgBox (Msg)
End Sub
and call it in Delphi like this:
  Excel.Run('MyMsgBox', 'Try this');

But it would be much easier (and faster!) to use Delphi's
own ShowMessage or MessageDlg functions.
--
Deborah Pate (no emails please!)

Re:Calling VBA commands inside Delphi


Goto msdn.microsoft.com and order the VBA devellopers kit. i think it's
something near $20 including shipping to you. In this box is all you need to
connect to VBA. Districution is a other part it's not free but a per install
fee.

--

Greetings Andre Mens

www.mensand.com QReport Artist EndUser report designer

Haci Fehmi Ozgun <hfoz...@ihlas.com.tr> schreef in berichtnieuws
39005e8b@dnews...

Quote
> Hi,

> I wrote procedure that transfers data from dbgrid to Excel
> At the end I want to display a message
> My question is how can I call Msgbox function in Delphi

> Thanks.

Other Threads