Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default HPageBreaks.Add

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default HPageBreaks.Add

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



Stephen Plotnick 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.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default HPageBreaks.Add

Thanks, I do not think this works for VB.


"Dave Peterson" wrote in message
...
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



Stephen Plotnick 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.


--

Dave Peterson


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HPageBreaks.Add GeorGeorGe Excel Worksheet Functions 0 February 9th 05 09:31 PM
More HpageBreaks Strangeness BillzyBop Excel Programming 0 June 23rd 04 03:40 AM
HPageBreaks oddities... Alex T Excel Programming 3 June 8th 04 02:01 PM
Insert HPageBreaks Robert Christie[_3_] Excel Programming 2 November 15th 03 07:01 AM
Can't set manual HPageBreaks J.E. McGimpsey Excel Programming 0 July 15th 03 03:52 PM


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"