Re: Page Break in Excel from VB 2005



'o***.HPageBreaks.Add.Range("A72")
..

"rowe_newsgroups" <rowe_email@xxxxxxxxx> wrote in message news:1183999625.014207.264600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 9, 12:43 pm, "Stephen Plotnick" <the...@xxxxxxxxxxxxx> wrote:
Seth,

THanks for the reply. That is what I did and I always get an exception at
run time. I googled and seemed to have tried everything and it never seems
to work.

Steve"rowe_newsgroups" <rowe_em...@xxxxxxxxx> wrote in message

news:1183998991.748123.138610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> On Jul 9, 12:24 pm, "Stephen Plotnick" <the...@xxxxxxxxxxxxx> wrote:
>> I'm using VB 2005 and Excel 2007 and cannot figure out how to insert a
>> page
>> break before line 72. I've tried several ways but always get an >> exception
>> error.

>> Thanks in advance.

> I would recommend you use the "Record Macro" functionality of Excel
> and record a macro of you adding the pagebreak. Then you just have to
> modify that classic vb code to Visual Basic .Net and use it in your
> application.

> Thanks,

> Seth Rowe

Post your code.

Thanks,

Seth Rowe


.