Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default automatically put in page break after 14 lines.

Hello from Steved

Is it possible please to have a line break put in after every 14 lines please.

If this is possible How.

Thankyou.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default automatically put in page break after 14 lines.

You are limited to 1026 Horizontal page breaks per worksheet, so you cannot
fill you whole sheet of 65536 rows every 14 lines. But if you need less
than 1026 try this....... set the xr range to the maximum number of used
rows.

Sub PageBreaks()
Dim xr As Long
For xr = 15 To 500 Step 14
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Cells(xr, 1)
Next xr
End Sub

--
Cheers
Nigel



"Steved" wrote in message
...
Hello from Steved

Is it possible please to have a line break put in after every 14 lines

please.

If this is possible How.

Thankyou.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default automatically put in page break after 14 lines.

Excellent thanks very much

I only reqiure just over 50, so this will do nicely.

"Nigel" wrote:

You are limited to 1026 Horizontal page breaks per worksheet, so you cannot
fill you whole sheet of 65536 rows every 14 lines. But if you need less
than 1026 try this....... set the xr range to the maximum number of used
rows.

Sub PageBreaks()
Dim xr As Long
For xr = 15 To 500 Step 14
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Cells(xr, 1)
Next xr
End Sub

--
Cheers
Nigel



"Steved" wrote in message
...
Hello from Steved

Is it possible please to have a line break put in after every 14 lines

please.

If this is possible How.

Thankyou.





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
How to remove page break lines in normal view? [email protected] Excel Discussion (Misc queries) 6 April 4th 23 02:19 PM
how to remove the page break lines in a spread sheet, gypsie g Excel Discussion (Misc queries) 1 March 22nd 10 03:22 AM
Page Break Lines in Excel 2007 Ostate Excel Discussion (Misc queries) 2 February 24th 07 04:48 PM
Can I set an automatic page breaks to break every 40 lines? Kennbu Excel Discussion (Misc queries) 1 June 15th 06 05:59 PM
Hatched page break lines Hotbird[_2_] Excel Programming 2 February 20th 04 02:36 PM


All times are GMT +1. The time now is 12:26 AM.

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

About Us

"It's about Microsoft Excel"