Not sure if anyone can help, but I am getting the following error message when running some VBA code in Excel 2000
Run-time error '-2147417848(80010108)
Method 'Add' of object 'HPageBreaks' failed
Then when I choose End or Debug I get the following Error Message
The instruction at "0x77fc8dbd" referenced memory at "0x00000000". The memory could not be "Written".
Then when I click on OK or Cancel, Excel terminates.
If I remove the Page Break line form the VBA the Macro works correctly.
The Code I am using is
Rows(ReportLoop + 2 & ":" & ReportLoop + 2).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Any help would be appreciated
Cheers
Ozzie
Run-time error '-2147417848(80010108)
Method 'Add' of object 'HPageBreaks' failed
Then when I choose End or Debug I get the following Error Message
The instruction at "0x77fc8dbd" referenced memory at "0x00000000". The memory could not be "Written".
Then when I click on OK or Cancel, Excel terminates.
If I remove the Page Break line form the VBA the Macro works correctly.
The Code I am using is
Rows(ReportLoop + 2 & ":" & ReportLoop + 2).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Any help would be appreciated
Cheers
Ozzie