Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine user's Email Address AP[_3_] Excel Programming 1 March 26th 09 10:39 AM
Cant move pagebreak in PageBreak View in Excel2003 Vasanthan Excel Worksheet Functions 1 August 22nd 07 03:28 PM
How can I rid Page 1 watermark in Pagebreak Preview? Peaceful Joy Excel Worksheet Functions 1 April 28th 07 12:57 AM
Remove page number under pagebreak preview Gary Excel Discussion (Misc queries) 1 May 4th 05 04:59 AM
determine pagebreak using VBA mirec Excel Programming 2 April 15th 05 01:36 PM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"