Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel XP & Win XP
I am helping an OP with a task that involves hiding/unhiding a variable number of columns. When it comes time for the code to print, it will be necessary that the code select Portrait or Landscape for the printing, depending on the total width of the visible columns (either way, the print range is no more than one page wide). My question is: What would be the code to determine the location of the first vertical page break? Thanks for your time. Otto |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This was obtained from the VBA Help file:
This example sets a manual page break above row 25 on Sheet1. Worksheets("Sheet1").Rows(25).PageBreak = xlPageBreakManual This example sets a manual page break to the left of column J on Sheet1. Worksheets("Sheet1").Columns("J").PageBreak = xlPageBreakManual This example deletes the two page breaks that were set in the preceding examples. Worksheets("Sheet1").Rows(25).PageBreak = xlPageBreakNone Worksheets("Sheet1").Columns("J").PageBreak = xlNone Have fun.. "Otto Moehrbach" wrote: Excel XP & Win XP I am helping an OP with a task that involves hiding/unhiding a variable number of columns. When it comes time for the code to print, it will be necessary that the code select Portrait or Landscape for the printing, depending on the total width of the visible columns (either way, the print range is no more than one page wide). My question is: What would be the code to determine the location of the first vertical page break? Thanks for your time. Otto |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveSheet.VPageBreaks(1).Location.Address
NickHK "Otto Moehrbach" wrote in message ... Excel XP & Win XP I am helping an OP with a task that involves hiding/unhiding a variable number of columns. When it comes time for the code to print, it will be necessary that the code select Portrait or Landscape for the printing, depending on the total width of the visible columns (either way, the print range is no more than one page wide). My question is: What would be the code to determine the location of the first vertical page break? Thanks for your time. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing landscape and portrait | Excel Discussion (Misc queries) | |||
From portrait to landscape | Excel Worksheet Functions | |||
Landscape Portrait | Excel Discussion (Misc queries) | |||
Printing in Portrait & Landscape | Excel Discussion (Misc queries) | |||
Landscape and Portrait | Setting up and Configuration of Excel |