HPageBreaks.Add

  • Thread starter Thread starter Stephen Plotnick
  • Start date Start date
S

Stephen Plotnick

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 don't speak the VB, but if I were doing it in VBA, I'd use:

Option Explicit
Sub testme()
Dim myCell As Range
Set myCell = Worksheets("Sheet1").Range("A72")
myCell.PageBreak = xlPageBreakManual
End Sub
 
Thanks, I do not think this works for VB.


Dave Peterson said:
I don't speak the VB, but if I were doing it in VBA, I'd use:

Option Explicit
Sub testme()
Dim myCell As Range
Set myCell = Worksheets("Sheet1").Range("A72")
myCell.PageBreak = xlPageBreakManual
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top