Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine address of pagebreak preview
If I have text in cell A1 that visually extends over several columns,
viewing the worksheet in Page Break Preview shows the number of columns that will be printed. Is it possible in VBA to determine what this Page Break Preview address is, e.g., A1:F1? Thanks in advance. Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine address of pagebreak preview
I'm not sure if you can get the address of the pagebreakview, but you can
return the address of the print area, which should be what you see in the pagebreak view. Dim rngPr As String rngPr = Sheets("Sheet1").PageSetup.PrintArea Then, if you need, you can extract the column from this string. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine address of pagebreak preview
On Jul 31, 4:16*pm, Mark Driscol wrote:
If I have text in cell A1 that visually extends over several columns, viewing the worksheet in Page Break Preview shows the number of columns that will be printed. *Is it possible in VBA to determine what this Page Break Preview address is, e.g., A1:F1? Thanks in advance. Mark Hi I played around and this is my suggestion Sub Sub_hpagebreaks() Dim n As Variant For n = 1 To ActiveSheet.HPageBreaks.Count Debug.Print ActiveSheet.HPageBreaks(n).Location.Address Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Determine user's Email Address | Excel Programming | |||
Cant move pagebreak in PageBreak View in Excel2003 | Excel Worksheet Functions | |||
How can I rid Page 1 watermark in Pagebreak Preview? | Excel Worksheet Functions | |||
Remove page number under pagebreak preview | Excel Discussion (Misc queries) | |||
determine pagebreak using VBA | Excel Programming |