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