Delete Page Breaks -

N

NateBuckley

Hello, I'm having a little difficulty understanding why the following isn't
working

I have two page breaks on a Sheet that i've added to test this out.

All I want to do at the moment is just make sure that it's finding the page
breaks (as my for each loop wasn't doing anything)

Heres the code

Public Sub removeBreaks()
Dim brks As HPageBreaks
Set brks = Sheet7.HPageBreaks
MsgBox brks.count
End Sub

Now I know I have two page breaks, but brks.Count returns 0, so it's not
returning them. Is there another collection for pagebreaks, or perhaps I'm
neglecting something?

Thanks in advance!

Nathan
 
S

Stefi

Set brks = Worksheets("Sheet7").HPageBreaks
Regards,
Stefi

„NateBuckley†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top