Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to Insert Excel Page Breaks
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00434717
Message ID:
00434739
Views:
18
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

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform