View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Excel 2007 PageBreaks Question

I think I'm going to try this approach

For i = 1 to myWS.HPageBreaks.Count

next i

If that doesn't work, I"ll be back.

Barb Reinhardt



"Barb Reinhardt" wrote:

I've been using the following code in 2003 and 2007

Dim myPageBreak as Excel.HPageBreak

For Each myPageBreak In myWS.HPageBreaks
blah blah blah

next myPageBreak

On one machine with Office 2007, there are no problems (the one I have
access to). On another machine, there are problems. This particular
worksheet has 3 page breaks and if I do this
debug.print myWS.HPageBreaks.count I get 3 (on the other machine)

Has anyone seen anything like this? What do I do to address it?

Thanks,
Barb Reinhardt