Copy Page Breaks #3

Dave,
That was the very first thing I tried, but when the sheets are groupe
you can't drag or insert page breaks.  I don't know why it wouldn'
work, it seems if your page breaks were in the same place on eac
worksheet (mine were when I tested it) then it wouldn't cause an
problems.  

I guess I am still looking for an answer from someone about my VBA ide
from above!

Thanks Again

--
jwleonar
-----------------------------------------------------------------------
jwleonard's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=948
View this thread: http://www.excelforum.com/showthread.php?threadid=27650

0
11/11/2004 2:55:09 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
358 Views

Similar Articles

[PageSpeed] 33

I couldn't drag the pagebreaks in "page break preview" mode--with multiple
sheets selected.

But I could insert via insert|pagebreaks via the worksheet menubar.

And I could insert|pagebreaks in normal view, too (with grouped sheets).

With code:

Option Explicit
Sub testme()

    Dim mstrWks As Worksheet
    Dim wks As Worksheet
    Dim hPB As HPageBreak
    Dim vPB As VPageBreak
    
    Set mstrWks = Worksheets("sheet1")
    
    For Each wks In ActiveWorkbook.Worksheets
        If wks.Name = mstrWks.Name Then
            'do nothing
        Else
            wks.ResetAllPageBreaks
        End If
    Next wks
    
    For Each hPB In mstrWks.HPageBreaks
        MsgBox hPB.Location.Address
        For Each wks In ActiveWorkbook.Worksheets
            If wks.Name = mstrWks.Name Then
                'do nothing
            Else
                wks.HPageBreaks.Add _
                    before:=wks.Range(hPB.Location.Address)
            End If
        Next wks
    Next hPB
    
    For Each vPB In mstrWks.VPageBreaks
        MsgBox vPB.Location.Address
        For Each wks In ActiveWorkbook.Worksheets
            If wks.Name = mstrWks.Name Then
                'do nothing
            Else
                wks.VPageBreaks.Add _
                    before:=wks.Range(vPB.Location.Address)
            End If
        Next wks
    Next vPB
            
End Sub





jwleonard wrote:
> 
> Dave,
> That was the very first thing I tried, but when the sheets are grouped
> you can't drag or insert page breaks.  I don't know why it wouldn't
> work, it seems if your page breaks were in the same place on each
> worksheet (mine were when I tested it) then it wouldn't cause any
> problems.
> 
> I guess I am still looking for an answer from someone about my VBA idea
> from above!
> 
> Thanks Again!
> 
> --
> jwleonard
> ------------------------------------------------------------------------
> jwleonard's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=9488
> View this thread: http://www.excelforum.com/showthread.php?threadid=276500

-- 

Dave Peterson
0
ec357201 (5290)
11/11/2004 3:55:36 AM
Reply:

Similar Artilces:

plain text and line breaks
I am using Outlook 2000. I prefer to use the quoted printable encoding = for e-mail messages, since this doesn't create line breaks. I was wondering, however, why, if one selects plain text with no = encoding, one *must* specify a line length. I.e. why can't Outlook (or = other mailing programs for that matter) send pure plain text with line = breaks only where the user inserted them by pressing Enter. In such = case, the message source would read a paragraph as one long line, but = the receiving mailing program should be able to wrap this line so that = it fits onto the screen. By the...

Dragging to copy increments by one
I frequently drag a cell to copy it to the cells below. If there is a number in the cell, it is automatically incremented by one in the new cells. How do I stop this "incrementing" behavior"? Thanks! Hank Hank wrote: > I frequently drag a cell to copy it to the cells below. If there is a > number in the cell, it is automatically incremented by one in the new > cells. How do I stop this "incrementing" behavior"? > > Thanks! > > Hank Instead of dragging from the corner, mark the cells including the filled one and use Ctrl-D Hank Try h...

Displaying XML in an .aspx page
I am trying to create an xml page on the fly using asp.net with vb. I am currently reading data from my database into a dataset and then using the xmlwriter() to output it to the clients screen. But.............. i want to be able to edit the content which comes out, i have to add some exta nodes which are static in between the database records. So i have created a loop which reads through the database and outputs the records. however i have tried to output it using response.write(database record) this outputs the data but does not display correctly in the browser. when viewing the source cod...

Exchange Administrator #3
Has anyone out there installed Exechange Administrator 5.5 on a Windows Server 2003 box? If you have any help on how to get it to install would be helpful. Thi sis more than likely, not possible. -- regards, Michael Abbaticchio MVP for Exchange Server http://mvps.org/exchange "Eric" <eric.abrams@mhmr.state.tx.us> wrote in message news:376c01c47f18$0b4d6260$a301280a@phx.gbl... > Has anyone out there installed Exechange Administrator 5.5 > on a Windows Server 2003 box? If you have any help on how > to get it to install would be helpful. ...

Date changes back 4 years when copying
When we copy a date from an excel 2000 worksheet and paste it in an excel XP worksheet the year will move back four years. Any ideas? Go Tools > Options > Calculation and make sure both files have '1904 Date System' either checked or unchecked, ie both the same, Regards "Dave" <anonymous@discussions.microsoft.com> wrote in message news:328401c4a4e0$a7dacb20$a301280a@phx.gbl... > When we copy a date from an excel 2000 worksheet and paste > it in an excel XP worksheet the year will move back four > years. Any ideas? > > In article <328401...

trying to print 2 pages on one a4 text not printing both sides
I am trying to print 2 invitations on 1 A4 paper. The print preview shows it correctly but when I print the pictures are on each side but the text is doubled up on the left hand side ? How can I fix this? Most probably a printer driver problem. See if there is an updated printer driver available on the manufacturer's website. As an alternative, using the free PrimoPDF converter to print (convert) your document to a .pdf file and then use the Adobe reader to print it out. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my service...

navigate from HTML page in resource
Hello, I use WebBrowser Control to navigate in Web page. But I have a problem with HTML page in resource. I can load these pages with : TCHAR tszPath[MAX_PATH]; CString strURL; GetModuleFileName(AfxGetInstanceHandle(), tszPath, sizeof(tszPath)); strURL.Format(_T("res://%s/%d"), tszPath, IDR_TUTO_10); m_wndWebbrowser.Navigate(strURL,0,0,0,0); But if the page contain a Picture (.jpg) , instead of having the picture I have nothing, only a red cross. How can I include the JPG to my resource and to show it when the HTML page is loade ?? Thx in advance, and excuse me for my very ba...

How to copy a workbook
I need to know how to copy a workbook in a macro (Excel 2002) The filename of the workbook to be copied is "Template" (w/o quotes) The new workbook will have the name of an employee, ie several workbooks, each having the name of an employee. Variable: EMP = "John Doe" Code needed to copy workbook TEMPLATE and rename to variable EMP. Thanks, Les Hi, This would go in your 'template' workbook. This string S = "aaa,bbb,ccc" should be changed to your list of employees Sub Sonic() Dim V As Variant Dim S As String S = "aaa,...

Publisher: Why won't my text wrap around a photo I have copied?
In Publisher 2000, it was dead straight forward... you pasted your image inside a text box and the text went around it. In 2003, the text either dissapears behind the image or gets transposed over the image. Any ideas? >-----Original Message----- >In Publisher 2000, it was dead straight forward... you pasted your image >inside a text box and the text went around it. In 2003, the text either >dissapears behind the image or gets transposed over the image. > >Any ideas? > > >. > Layers!! Select either the image or text box, then choose Order from the Arr...

Help! error while installing CRM 3.0
Hi, During the installation of the CRM SBE 3.0 on SBS server 2003 premium, performing binary install of Microsoft CRM server components, I got en error, CRM 3.0 server setup failed, here is the last part of the crm30svrsetup.log. .... Installing MSCRM prepopulated data 08:49:50| Info| Creating indices in MSCRM database 08:49:51| Error| Install exception.System.Exception: Action Microsoft.Crm.Setup.Server.InstallDatabaseAction failed. ---> System.Data.SqlClient.SqlException: The Microsoft Search service cannot be administered under the present user account at System.Data.SqlClien...

Non-Delivery Report Copy
I added another address to send a copy of Non-delivery report in the SMTP VS1. If this address is an alias for a mailbox user, that person get the NDR. If I add this alias to a mail enabled Public Folder, there is no NDRs being received. Why is there no NDRs. Also happens if the alias is for a mail enabled DL. Using Exchange 2003. Thanks RajiA For some reason, it has always worked this way (even in Exchange 2000). I do not know the technical reasons why, so I will try to find out. -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchangeblog.com &qu...

Plotting 3 dimensional co-ordinates #2
I have a series of data in x, y, z co-ordinates and want to know if it is possible to plot these in excel, as I can only seem to find thet it plots in the x and y axis. Thanks See the response to the same question in a concurrent discussion in the same newsgroup. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <d84601c43af2$8493ec80$a401280a@phx.gbl>, julian.broomfield@gfaus.com.au says... > I have a series of data in x, y, z co-ordinates and want > to know if it is possible to...

New Update Microsoft Office 2004 for Mac 11.3.4
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3254227027_2096185 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Before you install this update, make sure that the Microsoft Office 2004 for Mac 11.3.3 Update is installed on your computer. Be sure to quit all Office applications and Notifications before installing. Quit any virus software also. Note: Entourage will still show 11.3.3 (061214) under About Entourage after the update. About Word shows as 11....

How to detect page refresh in vc++
Hi I have created a toolbar for IE in ATL,COM and WTL without using MFC.Now I want to get notification whenever the user changes the URL in the address bar or does a page refresh.I am using BeforeNavigate2 function which is working properly for any URL change,but not working for page reload or refresh.I need to get notified whenever there is a page refresh and whenever there is a navigation to different page.How to get it? <bhattacharjeesoft@gmail.com> wrote in message news:1191417666.466439.274960@k79g2000hse.googlegroups.com... > Hi > I have created a toolbar for IE in ATL,...

CPropertySheet -- insert a page?
Hi, Is it possible to insert a page to CPropertySheet? I only foud teh AddPage() function, I assume it adds the page as the last page, but I need to insert a page. Thanks! WJ Why don't you add the 'rearraged' list of pages again to the sheet when you want to do this. "WJ" wrote: > Hi, > Is it possible to insert a page to CPropertySheet? I only foud teh AddPage() > function, I assume it adds the page as the last page, but I need to insert a > page. > Thanks! > > WJ Thanks. I have thought about this. Will the tab flash though? I guess I nee...

How to copy (or move) Journals from one folder to another
Yesterday I had to rebuild my Outlook file, and I have a working version now but all my journals are in a 2nd folder rather than in the main Journal one. As I can't delete the empty main one, ideally I'd like to move the entrieds from the second one to the main folder. Is this possible? I tried exporting them to a pst file and importing them but either it didn't work or I did it wrong. Any help gratefully recieved rdc You did it wrong - NEVER use the import/export option to move native = Outlook data. Having already done so, you now have a corrupt profile. Create a ne...

HTTP 500 internal error on OWA PAGE
When i try to log onto outlook web access i get a http 500 internal error that the page cannot be displayed all related services have been restarted but still no progress help please ihuoma To configure process level value with LOW. "teamann" wrote: > To configure process level value with LOW. Btw where can i change this option also does this solution work if this issue only surface after i've upgraded to exchange SP2? ...

Copying GridLines with AutoFill
I have a fill macro assigned to a worksheet that is designed to only copy over items that show a quanity of one or more items. If the macro detects a quanity of one or more for a particular item it copies that item over to another Quote worksheet. The problem is that when the data is being copied over to the Quote worksheet it is also copying over all the gridlines that surround the data from the main worksheet. How do I make this macro ONLY copy over the text information and not the gridline formatting that surrounds the data when this macro is ran? Thx! Elusive, Instead of doing a ...

Moving from 3.0 to 4.0
Hi based on Rob Mottrams and Patrick Verbeeten earlier answers to my postings - I now have the following plan; 1) From the production enviroment copy the databases (MSCRM and METABASE) to the test enviroment and restore them there on that 32 bit SQL server. 2) Run the CRM 4.0 installation on top of the CRM 3.0 installation in the test enviroment - (that way database, workflows etc. gets upgraded) the 4.0 install process also creates the MSCRM_config database. 3) Then move the upgraded databases (MSCRM, METABASE and MSCRM_config) back in production and restore them there. 4) Install CRM 4.0 o...

Customize the home page forms
Hello All, thanks in advance for help How can I disable specific navigation controls and action buttons on the home page using javascript.. i.e. the views for activities / leads/ contact that is 1st shown when the CRM application loads, such as file, new, create new campaign response. I am able to accomplish this on individual entities using javascript in the onload event, and performing the following form customization to the crmForm.. // disable menu nav if(document.getElementById('_MIonActionMenuClickapplyrule4210')!=null) {document.getElementById('_MIonActionMenuCl...

copying cells from other worksheets
How do I copy individual cells into one worksheet from other (more than one) worksheets into a formula and then copy the remainder of the column to match each corresponding cell like the first one copied so that I am copying same cell areas from each worksheet when I drag and copy that one formula? Not sure if I explained this correctly. For example there are four lodging properties (or worksheets with the same template) and one resort worksheet. So I am copying a1 from each of the four worksheets in a simple addition formula that I need to have duplicate for b1, c1, and so forth acr...

CRM 3.0 Deleting Outlook CRM Contacts
Asked this before for 1.2 so sorry, now need to know what can be done in CRM 3.0. When a user creates an Account or Contact in CRM 3.0 it also gets created in your Outlook Contacts. This is good if you are synching to a PDA etc. But, we have one user type in about 800 or the 1200 records and now she has them all in her contacts and does not need them there. The other user who entered the other 400 has those in hers. Yes I now see the wisdom that we should have entered them all using the CRM Admin account or something but it is too late for that now. So... my question is how can thos...

Problem with Catalog Merge and Master pages
I have a four page document set up that has a 2-page master page. The master page has mirrored margins with the inside margin at 0.5" and the outside margin at 0.125". I set up a catalog merge with the first page having 1 across and 4 down. When I go to merge the data, all my pages are numbered 1 and they all have the same margins instead of the mirrored margins for oposite pages. How do I get the catalog merge to merge across the pages correctly? Are you creating a new publication in step three? (2007) If you do this and then add the page numbers all will be well. Print me...

How to tell when page loas completes with CHtmlCtrl/CHtmlView?
I have been poking around and have a test program running that uses the CHtmlCtrl written by Paul DiLascia. The docs seem to indicate that OnDocumentCOmplete() is called when the current page load is complete. However, I have implemented all of the event virtual methods that look interesting, then I ran the program with breakpoints set in each of them (I'm loading http://www.ebay.com in my tests), and I don't see this behavior. The OnDocumentCOmplete() gets called multiple times, as does OnBeforeNavigate2(), OnNavigateComplete2(), OnDownloadBegin(), OnDownloadComplete(). I'm...

Excel graphs should allow copy & paste of individual bar formats
In excel graphs - bar charts, I make the last bar a hashed shading as it is a forcast. To do this I select only the last bar and change its formating. At the end of the month I want to change the format back to the same as all the other bars and make the new coming month's predicted value that hashed shading etc. Unfortunately excel will not allow copy and paste in this situation - so I have do open the format tab etc and then change. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggest...