Hi Michael,
You need to pass a reference to the active cell. Here's an example:
oXL=createobject('excel.application')
oXL.visible = .t.
oXL.Range("A6").Select
oXL.ActiveWindow.SelectedSheets.HPageBreaks.Add(oXL.ActiveCell)
>I'm having difficulty translating the VFP equivalent of a VBA page break for an Excel spreadsheet. A recorded Excel macro of a page break produces the following:
>
>
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell>
>What would be the proper way of formatting this in VFP? I know how to activate the proper cell or row, but I need to know how to insert the page break.
>
>Thanks!
>Michael Reynolds
kenweber
GCom2 Solutions
Microsoft Certified Professional