Insert Page Break

Is it possible to insert a page break automatically when specific text is 
encountered in row A.  This report is hundreds of pages long and I need an 
automatic page insert macro.  Can someone give me the syntax of a macro if 
the specific text is "Break"?  Thanks for any help.

-- 
Don Rountree
0
Don4849 (203)
6/9/2005 1:44:03 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
329 Views

Similar Articles

[PageSpeed] 46

Hi Don
Try
Sub Macropagebreak()
For Each CELL In Range("A:A")
If CELL = "BREAK" Then
CELL.Rows.Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Else
End If
Next
End Sub

"Don" wrote:

> Is it possible to insert a page break automatically when specific text is 
> encountered in row A.  This report is hundreds of pages long and I need an 
> automatic page insert macro.  Can someone give me the syntax of a macro if 
> the specific text is "Break"?  Thanks for any help.
> 
> -- 
> Don Rountree
0
Tina (84)
6/9/2005 2:38:05 PM
Thank you for your help.  I entered this macro and when I ran it I got the 
error message that said - Complie error, variable not defined.  The first 
instance of the word CELL was highlighted.  Please tell me how to define this 
variable.
-- 
Don Rountree


"tina" wrote:

> Hi Don
> Try
> Sub Macropagebreak()
> For Each CELL In Range("A:A")
> If CELL = "BREAK" Then
> CELL.Rows.Select
> ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
> Else
> End If
> Next
> End Sub
> 
> "Don" wrote:
> 
> > Is it possible to insert a page break automatically when specific text is 
> > encountered in row A.  This report is hundreds of pages long and I need an 
> > automatic page insert macro.  Can someone give me the syntax of a macro if 
> > the specific text is "Break"?  Thanks for any help.
> > 
> > -- 
> > Don Rountree
0
Don4849 (203)
6/9/2005 3:08:01 PM
Sub MacroPageBreak()
Dim Cell as Range  '<-- add this line
'''rest of code here

Don wrote:
> 
> Thank you for your help.  I entered this macro and when I ran it I got the
> error message that said - Complie error, variable not defined.  The first
> instance of the word CELL was highlighted.  Please tell me how to define this
> variable.
> --
> Don Rountree
> 
> "tina" wrote:
> 
> > Hi Don
> > Try
> > Sub Macropagebreak()
> > For Each CELL In Range("A:A")
> > If CELL = "BREAK" Then
> > CELL.Rows.Select
> > ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
> > Else
> > End If
> > Next
> > End Sub
> >
> > "Don" wrote:
> >
> > > Is it possible to insert a page break automatically when specific text is
> > > encountered in row A.  This report is hundreds of pages long and I need an
> > > automatic page insert macro.  Can someone give me the syntax of a macro if
> > > the specific text is "Break"?  Thanks for any help.
> > >
> > > --
> > > Don Rountree

-- 

Dave Peterson
0
ec357201 (5290)
6/9/2005 7:32:32 PM
Reply:

Similar Artilces:

Page numbers in Word
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I cannot get Insert Page numbers to work in word, in documents elements when I choose Header, in other words, in any format. When I select Insert, etc. I get a grayed button reading "page" instead of the numbers. I even had an email response from Microsoft but their instructions did not correct the problem. They had me put several items in the trash, and finally restart. Nothing worked. It sounds to me like you simply may have toggled the display of Field Codes -- Try keying Option+F9 or go into the Head...

How do I get rid of blank pages between each page of reports
I am having a blank page put in between each of the pages of my reports and it is throwing off the next page layout, how do I get rid of these blank pages? -- Allen Most likely the design width of your report slightly exceeds 8-1/2" minus the left margin minus the right margin you have set in Page Setup. This will cause a blank page between each of the pages of your report. Decrease the design width of your report or set your left and right margins smaller. Steve "Allen G." <AllenG@discussions.microsoft.com> wrote in message news:B98A069A-C871-4C6F...

change page order
I have been trying to print a newseletter. It is 8 8.5X11 pages - or 4 11X17 pages. In the 2003 publisher I was able to change the page order on the layout tab of the page setup so my printer would print it correctly. In 2007, I can not figure out how to change the page order in order to print the newsletter. So it is printing it all funny with multiple pages on top of each other. How can I fix this to print correctly? Please help! Printing from 2007 is an adventure to say the least. Is this setup as a booklet? Do you have a duplex unit? If not... Try this: print page range.. 1,6,3,8...

formatting a page
I have 3 pages of names that I would like to combine into 1 page. How would I do this? Create a 3 column report. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access Co-author: "Access 2010 Solutions", published by Wiley "patty44" <patty44@discussions.microsoft.com> wrote in message news:375F9BB6-48F6-4885-8787-86ED8FAA098C@microsoft.com... >I have 3 pages of names that I would like to combine into 1 page. How would >I > do this? aaa "patty44" <patty44@discussions.mi...

create page 2 in check register
How do I create a second, third and fourth page in the check register? I am very new and am lost Hi I'm not sure what the check register is, maybe an Excel template. But, creating a new sheet in Excel, right click on the Sheet tab>Insert>Worksheet. Regards Roger Govier star_gate wrote: > How do I create a second, third and fourth page in the check register? I am > very new and am lost Could elaborate please. What is a check register? Thanks. Bill Ridgeway Computer Solutions "star_gate" <star_gate@discussions.microsoft.com> wrote in message news:88EF...

Numbered headings, TOC, page-numbering, template
Word 2007: I am working on a manual that has chapters and appendixes. I am also trying to create a template such that later writers can use the template and simply select the appropriate styles for each heading. I want to have numbered headings such that I can specify page numbering 1-1, 1-2, ...2-1,2-2, ...A-1, A-2, A-3 etc. I created my own styles based on Normal, Heading 1, Heading 2, Heading 3 but with different names and with numbering specified. When I use one of my personal headings, they act ok in the text, but when I try to specify the 1-1 style of page numbering in ...

How do I repeat an ellipsis without going into Insert/Symbol, etc
In Excel, I prefer to copy & paste other items, but like to use an ellipsis frequently. i.e., is there a "frequently used" function, so that I don't have to be copy/paste over & over, &/or go into Insert/Symbol, each time I want an Ellipsis. Basically i want to click, or maybe Ctrl+click something to get an Ellipsis in a handy fashion, "…" (there's one) HELP! Try inserting it as a new option to replace with within: Tools > AutoCorrect options -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "test-J" wrote: > I...

Repeat Page Set-Up
How do you repeat page setup for different worksheets within a workbook? I want the same headers/footers/page numbering, etc. on each worksheet. Thanks. With the sheet with the desired settings active, ctrl/click the other sheet tabs (or select All sheets), then use File/Page Setup and just click OK. Then shift/click another sheet tab to get out of group mode, and you're all set! Bob Umlas Excel MVP "Jeannie" <anonymous@discussions.microsoft.com> wrote in message news:921c01c4861b$cb22a1e0$a501280a@phx.gbl... > How do you repeat page setup for different worksheets...

How do I set up filter for page fields in pivot table?
I have a fantastic pivot table that I built that I use to answer questions from by customers. However, the questions are often varied and I find it difficult to easily select and de-select data. Is there a way to filter the page fields in a pivot table. For example, I might need to go from seeing all the data for one plant to the data for one material at all the plants. I have over a thousand materials, over a hundred plants. So, going from one set to data to the other is taking some time because I have to select and de-select so many individual items. I would really like to add a...

How do you edit the main Exchange 2003 OWA title page?
Hi, Can anyone please tell me how to edit the title of the Exchange 2003 Outlook Web Access pages (this is the main OWA page title)? I have found the logon.asp and logoff.asp pages and changed the wording and titles on these, but I can't find the main Exchange 2003 OWA page to edit. Does anyone know how to do this? Thanks in advance Ste It be under C:\inetpub\wwwroot/ You can edit it with frontpage "Ste" <stephenbrandley@hotmail.com> wrote in message news:%23WLcYn8NGHA.2036@TK2MSFTNGP14.phx.gbl... > Hi, > > Can anyone please tell me how to edit the ti...

How do I get excel to copy one cell to another page automaticaly
Can any one help I have two pages in my exell document and some of the data on each page is the same as the other. I would ike excel to enter this data to the cecound page automatically. ie. if i type 125743 on page one in g13 it enters also 125743 on page two f12 Thanks in advance Hi Tiddler, Assume the sheets are Sheet1 and Sheet2, in cell F12 on Sheet2, enter the formula: =Sheet1!G13 --- Regards, Norman "Tiddler" <Tiddler@discussions.microsoft.com> wrote in message news:47A865F4-8388-4E17-871C-A4FBDC76B71C@microsoft.com... > Can any one help I have two...

How do I see a .ESP image (logo) that is inserted in a worksheet?
Our printer has sent me a excel file that contains an image (our logo) that has the extension .esp. I can see the outline, but not the actual image. When you print the worksheet it prints correctly, but you cannot see the actual image on the screen or using preview. Any suggestions? I think you mean EPS, which is encapsulated postscript. I haven't worked with them for a long time, but when I did...you could save them *with headers* or without. When an EPS has a header, you can see the graphic on-screen. When it doesn't, you can't--you just get the box or perhaps the file...

Adding Streaming video to your web-page is as
Adding Streaming video to your web-page is as simple as a few clicks of the mouse with this amazing tool. http://www.ebvalues.com ...

How do I change (and save) the page style in Outlook 2003?
I put in a backround color, and a format style for my text. I want to change it back and save it. But it keeps returning to the way I first set it. How do I save the new changes???? ...

Inserting calculated fields in Pivot Table
I am working in pivot tables and created the table below The market share is created by calculating the % of column on the unit volume. I am trying to insert another column all the way to right to calulate the change in market share. When I tried to insert field, but the market share fields (which are calculated) do not show up in order to create a formula. I tried to do it as a calculated item but the insert item is grayed out and it won't let me execute. Any ideas Sales Mkt Shr Sales Mkt Shr Mkt shr Ch BAYLINER 547 7.5% 685 9.8% CARVER 1...

ie8: Find On Page Support Ubiquitous or Intermittent ??
IE8, XP3: I can't tell whether some web pages defeat Find on Page or if oleacc.dll module registration gets lost. Where can I copy it to make it permanent ? ...

Intermittent "You are not authorized to view this page" error in P
As the very recently implemented MS Project 2007 Administrator at the organization, I frequently check Server Settings to view queue activity or troubleshoot issues. However, on some days I am unable to access some of the links such as "Active Directory Resource Pool Synchronization". I receive the "You are not authorized to view this page" error. The Sharepoint server was implemented prior to the MS Project 2007 server implementation and may have something to do with this error appearing. Has anyone else had this error? How did you resolve it? -- Tra...

HELP!!...how do you insert pictures...
...in a non-binary newsgroup??.... ....nothin' illicit...all i wish s to insert smileys and simple small photos... ....NO!! porn or disgusting pics... ....tried the HTML function and it just will not work... please help...thanks in advance... CheechWizard <located@a.titty.bar> wrote: > ..in a non-binary newsgroup??.... SInce Outlook does not have newsreader capability, this is not an Outlook question. -- Brian Tillman >> ..in a non-binary newsgroup??.... > > SInce Outlook does not have newsreader capability, this is not an Outlook > question. ...do...

In Word how do i remmove a hperlink to a page in the document?
Hello, Any help would be great! Thanks Frank Right-click and choose "Remove hyperlink"? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Frank" <Frank@discussions.microsoft.com> wrote in message news:2711E212-E7DF-43C8-B502-5735F155992E@microsoft.com... > Hello, > Any help would be great! > Thanks > Frank > ...

Get web page title from URL
I produce a monthly report of the number of page views on a web site. The data is obtained from Google Analytics, and the pages are designated by their URLs. A data analysis service we used previously furnished both the title and URL of each page. The URL isn't terribly user-friendly--most people want to know what was on the page, not what its URL was (yes, they can click on the URL, but there are hundreds of pages in this report). Is there any way to get Excel to extract the page title of a URL listed in the workbook, and report it in an adjacent cell? These are hyperlinks in cells? May...

suppressing header on page 1 only
How do I put the auto page numbering in the header or footer, but suppress it on page one only? In Word, you can start header on page 2 or a new section - how do you do that in Excel? Excel doesn't have that option. You could record a macro in which you print page one, add the header/footer, print the remaining pages, then remove the header/footer. Robyn Roberts wrote: > How do I put the auto page numbering in the header or > footer, but suppress it on page one only? > > In Word, you can start header on page 2 or a new section - > how do you do that in Excel? -- ...

Page number shows "#" instead of number
Using Office 2007, I am viewing a Powerpoint presentation created by someone else. No matter what view (master, normal or printed out) the page number in the footer is expressed as "#" instead of the actual number. Two other people viewing the same presentation see the page numbers instead of the "#", so this must have to do with my own computer set-up. Any suggestions? What happends if you go to master view and in EACH of the layouts slide number area delete the<#> and then Insert > SlideNumber? -- john ATSIGN PPTAlchemy.co.uk Free PPT Hints, ...

Home page "Choose a Task" is all blanks!
Recently upgraded from Money 2002 to 2004. My "Custom" home page is now a blank page; the "Choose a Task" and "Choose a View" pull-down menus are blank, too. If I pull-down the (blank) menus, Money crashes with the typical "Send Error Report" window. I've tried reinstalling Money... didn't help. Anybody know what's happening, here? Which file saves my custom configuration - should I delete it? Thx&Rgds...mvm In microsoft.public.money, mmiller wrote: > >Anybody know what's happening, here? >Which file saves my custom c...

Starting a new group on a new page
How do I start each new group on a new page. I have a page break after the last group footer and before the page footer, but I get a blank last page that contains only the page header ( report title information) and page footer (page number information) information. What am I doing wrong? Thanks Gerry Goldberg On Wed, 20 Jan 2010 14:44:13 -0800, Goldar wrote: > How do I start each new group on a new page. I have a page break after the > last group footer and before the page footer, but I get a blank last page > that contains only the page header ( report title inf...

Page Break Preview
Is it possible to view a page in page break preview without the larg Page # in grey interferring with the view -- henr ----------------------------------------------------------------------- henry's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2387 View this thread: http://www.excelforum.com/showthread.php?threadid=47777 henry wrote: > Is it possible to view a page in page break preview without the large > Page # in grey interferring with the view? > > I don't think so. "Page Break Preview" implies that you want to know which page...