Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
using VB 6, and Excel 2002, (sp2),
I am trying to add page breaks to an excel workseheet using OLE Automation from a VB program. I have tried XLworksheet.HPageBreaks.Add Befo=ActiveCell XLWorksheet.HPageBreaks.Add ExcelWrkSheet.Cells(1, 1) and various other things suggested on the newsgroups and helper web sites. The VB program will compile ok, but when it tires to execute the HPageBeask.add I get Run time error 1004 application defined or object-defined error '---------------------------------------------------------------------- Microsoft has this as is documentation on this Add method as it applies to the HPageBreaks object. Adds a horizontal page break. Returns an HPageBreak object. expression.Add(Before) expression Required. An expression that returns an HPageBreaks object. Before Required Object. A Range object. The range above which the new page break will be added. '----------------------------------------------------------------------- Thanks in Advance, Laurence Nuttall Programmer Analyst III UCLA - Division of Continuing Education |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I can't move my page breaks in Page Break Preview | Excel Discussion (Misc queries) | |||
When automatic page breaks are moved each cell becomes a new page | Excel Discussion (Misc queries) | |||
Vertical page breaks won't drag in Page Break Preview | Excel Discussion (Misc queries) | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
Page Breaks- Printing selected rows on same page | Excel Discussion (Misc queries) |