Results 1 to 10 of 10

Help with VBA to adjust page break over on column

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Help with VBA to adjust page break over on column

    Can we add something that would make the page break at the end of column C? and to set the page break to stop at the last filled row?

    Sub FormatEDNotepad()
    Rows("1:4").Delete
    Columns("c").ColumnWidth = 125
    Columns("d:l").Delete
    Columns("b").ColumnWidth = 30
    Columns("a").NumberFormat = "mm/dd/yy hh:mm:ss am/pm"
    Columns("a").ColumnWidth = 25
    Range("a1:IV65536").Select
        Selection.UnMerge
        Range("E9").Select
    End Sub

    Edit** Adjusted code to do page break, but when I save as a PDF I get hundreds of blank pages after my data.

    Sub FormatEDNotepad()
    Rows("1:4").Delete
    Columns("c").ColumnWidth = 125
    Columns("d:l").Delete
    Columns("b").ColumnWidth = 30
    Columns("a").NumberFormat = "mm/dd/yy hh:mm:ss am/pm"
    Columns("a").ColumnWidth = 25
    Range("a1:IV65536").Select
        Selection.UnMerge
        Range("E9").Select
    ActiveWindow.View = xlPageBreakPreview
    ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1
    ActiveWindow.View = xlNormalView
    End Sub
    Attached Files Attached Files
    Last edited by taylorsm; 08-04-2016 at 08:26 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MACRO - Page Break when a column changes
    By jaime81 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2013, 02:34 AM
  2. Find First match value and add page break, findnext value and add page break
    By dwx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2013, 12:58 PM
  3. [SOLVED] Print page break after column change
    By dlorenzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2012, 03:55 PM
  4. Vertical Page Break / Column Break
    By kmg2424 in forum Excel General
    Replies: 0
    Last Post: 07-27-2010, 08:10 AM
  5. [SOLVED] any way to redisplay column headings after page break?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 12:05 PM
  6. [SOLVED] any way to redisplay column headings after page break?
    By Gerald Morris in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  7. [SOLVED] any way to redisplay column headings after page break?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  8. [SOLVED] any way to redisplay column headings after page break?
    By Gerald Morris in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1