Forum Discussion
Run-time error '1004': Unable to set the PageBreak property of the Range class
Dear Community,
I have created excel document for holding our beach tennis tournaments ratings.
It consists of several results pages and one rating report page (first one).
Rating is calculated and composed based on data from other sheets using VBA.
VBA script is run by clicking button on rating sheet.
Everything works fine, while no new player is added.
When new player is added to the rating, excel starts to show error message:
"Run-time error '1004': Unable to set the PageBreak property of the Range class"
When trying to insert page break using VBA.
If try to insert page break manually, it does nothing.
The only way is to remove the row and insert the new one.
In attached file Sheet 1 row 96 is place where page break should be insert.
I would be happy if anyone could suggest an idea, what is wrong with this doc.
Microsoft® Excel® for Microsoft 365 MSO (Version 2109 Build 16.0.14430.20292) 64-bit
Windows 10 Home 21H1 19043.1288
Thank you!
4 Replies
- JKPieterseSilver ContributorDoes it work if you put a 0 into cell A96?
- MikhailFigurinCopper ContributorUnfortunately, no.
- JKPieterseSilver ContributorI asked because I get a different error, probably because my system does not support the Russian (?) characterset your code contains