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
Title:
Excel ole question
Miscellaneous
Thread ID:
00325252
Message ID:
00325252
Views:
42
I have sent 2500 rows to excel, the sheet is open and I want to create an extended cost in column 'O'

I create the var lcLocation to reference the cell letter & #. When I pass it to Excell I get a C000000000005 error in VFP, and yes I have SP#3 installed.

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.


the code from excel macro looked like this:
Range("O2").Select
ActiveCell.FormulaR1C1 = "=RC[-5]*RC[-3]"
Range("O3").Select
End Sub

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform