Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving or removing a page break on an excel sheet with delphi

Status
Not open for further replies.

ryanb

Programmer
Apr 22, 2002
7
CA
I'm currently writing an application that exports from a couple of database tables to an excel spreadsheet. I've got the export working, but after I do an autofit on the exported data, Excel puts a vertical page break in the middle of my exported data. I've used a macro to give me the information I need to impliment the code in Delphi which is:

ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1

I cannot seem to determine what expression I should use to return a VPageBreak object so I can use the DragOff method the macro (and microsoft) says I should use to move the page break. Any help is greatly appreciated.
 
Check out faq102-1562 "How to export data to Excel" which describes a method to deduct the commands from the macro recorder
Steven van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top