Print issue

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
I have a sheet, which on command button click runs a macro which copies a range, unhides some rows at the bottom and then pastes into these.

That's all fine, except when I go to print the sheet, these new cells don't show up.

Any idea why? or how to rectify this?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You probably need to set the print area before printing, for example

Code:
ActiveSheet.PageSetup.PrintArea = ActiveSheet.UsedRange.Address
 
Upvote 0
Thanks VoG, have done something similar to that. Took a bit longer as I coded the specific range after each argument, where more cells are added. But your way looks like I could have just used that at the end procedure to automatically update to the range.


The issue I'm having now is how to place page breaks into the new info? I've tried using code like

Code:
ActiveSheet.HPageBreaks.Add Before:=Range("A265")

But that doesn't seem to work


Edit: Yes it does, just the first few new cells where added before I had included that code, so just needed to reset the page.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,702
Members
452,938
Latest member
babeneker

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