>I am attempting to use MS Excel to produce a report from vfp data. I have the spreadsheet loaded and formatted just the way I want it, except, I can not get hard page breaks in. I have tried every possible format I can think of but it still gives me an error. The actual line of code I have is:
> objexcel.Worksheets(1).HpageBreaks.Add.Range("A166")
>The error message is:
> Invalid number of parameters.
>Thanks for your help.
Try to use:
objexcel.worksheets(1).Range("C10").Select
objexcel.worksheets(1).HPageBreaks.Add(objexcel.ActiveCell)
objexcel.worksheets(1).VPageBreaks.Add(objexcel.ActiveCell)
Saludos,
A.G.P.
---------