VBA Adjust Page Break in Dynamic Sheet

cgfrank

Board Regular
Joined
Jun 9, 2014
Messages
51
Hi all
(picture attached to explain this).

I have an excel form that we're using for training and compliance inspections. It has 5 sections, each with a unique category. The main section is for my "Observations", and I used VBA and a button to add rows beneath it for "action items" - things I need the people on that site to do. Each of my 5 main sections can have action items added to it, so action items could appear in 5 different places.

This means that Category A gets longer each time an action item is added, and so does Category B, C, D, and E. Some days CAtegory A could be 10 rows. and the other ones are 3 rows, or 7. What ends up happening is the page break appears somewhere in the middle of one of the categories dividing the action items from their header category, or even in between 2 linked action items.

Is there any way to use VBA so it automatically places the page break line in between 2 sections/categories (below that categories action items but above the next category header).
2mn1z41.png
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,947
Messages
6,175,563
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top