Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel ole question
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00325252
Message ID:
00325265
Views:
17
>What version of Excel? I've found that with Excel 2000, since it spawns a new instance for each sheet, that GETOBJECT() isn't needed, but rather CREATEOBJECT(). Further, if this is a previous version, have you verified that an open instance of Excel exists?

thanks, It's E'97

here is the whole code:
gfile='c:\temp\inv2.xls'

oleApp = createobject("Excel.Application")
oExcel=oleApp.Application
oExcel.Workbooks.Add(gfile)

oleApp=getobject(,"Excel.Application")

for i = 1 to reccount('inv2')
lclocation = '"O'+alltrim(str(i+1))+'"'

Range(lclocation).Select
ActiveCell.FormulaR1C1 = "=RC[-5]*RC[-3]"
endfor
oleApp.Application.visible=.t.

If I comment out the entire for / endfor it opens the sheet as visible.

Thanks.

__Stephen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform