OLE Excel

OLE Excel

Postby Jack » Mon Dec 21, 2009 5: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
*
Jack
 
Posts: 288
Joined: Wed Jul 11, 2007 11:06 am

Re: OLE Excel

Postby Jack » 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 .
Jack
 
Posts: 288
Joined: Wed Jul 11, 2007 11:06 am

Re: OLE Excel

Postby nageswaragunupudi » Sat Dec 26, 2009 7: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
User avatar
nageswaragunupudi
 
Posts: 10626
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests