FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OLE Excel
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
OLE Excel
Posted: Mon Dec 21, 2009 05:07 PM

Hello ,

I have an excel sheet that is open and i want to execute a macro that is saved in an other xls file .
How to : ??
What is the syntax to Run a macro

  oxls := TOleAuto():New("Excel.Application")
  * Ouvre lefic3 a partir de Temp
  oxls:WorkBooks:Open("main.xls")
  *
  oBook := oxls:Get( "ActiveWorkBook")
  oSheet := oxls:Get( "ActiveSheet" )
  *
  oxls:visible:=.T.
  * 
  oxls:Workbooks:Run("'FILE2.xls'!macro1")      <==== ?????

Thanks
*

Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
Re: OLE Excel
Posted: Fri Dec 25, 2009 11:28 AM

I think that Jeff Barnes is able to help me with this .

Is it ?

Thanks

Merry xMas and a Happy New Year .

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: OLE Excel
Posted: Sat Dec 26, 2009 07:41 AM

oxls:Run("FILE2.xls!macro1") works.
But for me the macro is working only after I open the xls file containing the macro.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion