Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Page break in normal view set at startup
Excel 2003. Is it possible to have Excel with Tool/Options/View/Page Break
always set at startup. |
#2
|
|||
|
|||
Hi Stephen, try adding the following VBA code to the workbook Code: -------------------- Sub Auto_Open() ActiveSheet.DisplayAutomaticPageBreaks = True End Sub -------------------- HTH Art -- HiArt ------------------------------------------------------------------------ HiArt's Profile: http://www.excelforum.com/member.php...o&userid=19953 View this thread: http://www.excelforum.com/showthread...hreadid=402065 |
#3
|
|||
|
|||
Do you mean for a particular workbook or for all workbooks?
If you mean a particular workbook, you could use a macro like: Option Explicit Sub auto_open() Dim wks As Worksheet Dim ActCell As Range Set ActCell = ActiveCell For Each wks In ThisWorkbook.Worksheets wks.Select ActiveWindow.View = xlPageBreakPreview Next wks Application.Goto ActCell End Sub ====== If you mean everytime you open a workbook (or create a new workbook????), you could tie into an application event. Start a new workbook paste the code into the ThisWorkbook Module Back to excel and File|SaveAs Save it to a nice location, but as an Addin (use that dropdown at the bottom of the file|saveas dialog). Close excel reopen excel tools|addins|Browse for that addin you just created. You can always disable/re-enable it via the tools|addins menu. The code under the ThisWorkbook module: Option Explicit Public WithEvents xlApp As Excel.Application Private Sub Workbook_Open() Set xlApp = Application End Sub Private Sub Workbook_Close() Set xlApp = Nothing End Sub Private Sub xlApp_NewWorkbook(ByVal wb As Workbook) Call DoTheWork(wb) End Sub Private Sub xlApp_WorkbookOpen(ByVal wb As Workbook) Call DoTheWork(wb) End Sub Sub DoTheWork(wb As Workbook) Dim wks As Worksheet Dim ActCell As Range Set ActCell = ActiveCell For Each wks In wb.Worksheets wks.Select ActiveWindow.View = xlPageBreakPreview Next wks Application.Goto ActCell End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm You can read a lot more about application events at Chip Pearson's site: http://www.cpearson.com/excel/AppEvent.htm Stephen S wrote: Excel 2003. Is it possible to have Excel with Tool/Options/View/Page Break always set at startup. -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Page break in normal view set at startup
Do you think I could get a copy of your laser quoting file. -- SAHAJA ------------------------------------------------------------------------ SAHAJA's Profile: http://www.excelforum.com/member.php...o&userid=33517 View this thread: http://www.excelforum.com/showthread...hreadid=402065 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page break problems | Excel Worksheet Functions | |||
How do I delete the page watermark in the page break preview? | Excel Discussion (Misc queries) | |||
printing - creating new files on each page break | Excel Worksheet Functions | |||
Page view vs. Print View | New Users to Excel | |||
Page Break View - not the usual question | Excel Discussion (Misc queries) |