Macro to print range without blank rows

bgill

New Member
Joined
Aug 22, 2002
Messages
33
Searched for this but can't find what I need (or can understand). I have a work book that I will be giving to others to use. I want to give them a macro that will automatically print a range in sheet. The number of rows of data they have will vary and I want to have the macro set up so it will not print the blank rows at the end of the range.

I have data in columns A:L and from Row 1 up to row 300.

I have a print macro already but can't figure out how to not print the blank rows.

Thank you!!

Becky
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Maybe in your macro

With ActiveSheet
.PageSetup.PrintArea=.UsedRange.Address
End With
 
Upvote 0
Thank you. It did work.

This is what I am using to print the whole page.

Application.Goto Reference:="Print2Aw"
Selection.PrintOut Copies:=1, Collate:=True

The range "Print2Aw" is the worksheet from A1:L300. Perhaps using the named range is not the way to go?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,716
Members
452,939
Latest member
WCrawford

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