Excel VBA "HPageBreaks" crash

J

John Watchman

PageBreakRow = i + j - 2 (Pagebreak contains a
positive value after this)
Rows(PageBreakRow).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add
Before:=ActiveCell
When the above VB is executed I get a failure:
Run-time error '-2147417848 (80010108)' Method 'Add' of
object 'HPageBreaks' failed.
next message
The instruction at "0x77fcc453" referenced
at "0x00000000". The memory could not be "written".
 

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