Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Set print area

Hi, I have a little problem and I hope to find some useful answers!
Particulary , I wont to do for once command in exel in one Sheet make each
twentieth row to be break page and get it at once the 500 break pages.

Any help will be valuable!
Thanks in advance!
Mery

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Set print area

Hi,

I may have misunderstood but I calulate that a page break every 2 rows is 25
page breaks. Try this. Right click your sheet tab, view code and paste this
in and run it.

Sub standard()
For x = 21 To 501 Step 20
Cells(x, 1).Select
ActiveSheet.HPageBreaks.Add befo=ActiveCell
Next
End Sub

Mike

"Mery" wrote:

Hi, I have a little problem and I hope to find some useful answers!
Particulary , I wont to do for once command in exel in one Sheet make each
twentieth row to be break page and get it at once the 500 break pages.

Any help will be valuable!
Thanks in advance!
Mery

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Set print area

LastRow = Range("A" & Rows.Count).End(xlUp).Row
For RowCount = 20 To LastRow Step 20
ActiveSheet.HPageBreaks.Add Befo=Range("A" & RowCount)
Next RowCount
End Sub

"Mery" wrote:

Hi, I have a little problem and I hope to find some useful answers!
Particulary , I wont to do for once command in exel in one Sheet make each
twentieth row to be break page and get it at once the 500 break pages.

Any help will be valuable!
Thanks in advance!
Mery

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Set print area



Korisnik "Mike H" napisao je:

Hi,

I may have misunderstood but I calulate that a page break every 2 rows is 25
page breaks. Try this. Right click your sheet tab, view code and paste this
in and run it.

Sub standard()
For x = 21 To 501 Step 20
Cells(x, 1).Select
ActiveSheet.HPageBreaks.Add befo=ActiveCell
Next
End Sub

Mike

"Mery" wrote:

Hi, I have a little problem and I hope to find some useful answers!
Particulary , I wont to do for once command in exel in one Sheet make each
twentieth row to be break page and get it at once the 500 break pages.

Any help will be valuable!
Thanks in advance!
Mery


It's works,Thank you very much!!
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
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 4 April 23rd 23 09:04 PM
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
print area across the freeze panes area tom Excel Worksheet Functions 2 January 6th 07 05:23 PM
Macro - Set Print Area for Changing Data Area ksp Excel Programming 5 May 15th 06 10:20 PM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM


All times are GMT +1. The time now is 08:27 PM.

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"