ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Area Question (https://www.excelbanter.com/excel-programming/274201-print-area-question.html)

Will Francis

Print Area Question
 
Hi Folks

I am looking for a piece of code which will enable me to
print a selection, the selection being cells selected by
AutoFiltering cells.

At the moment I have code which filters cells, how do I
then set this range as the print area?

Any help appreciated.

Thanks
Will

Abdul salam

Print Area Question
 
Hi,


Only the visible cells (filtered data will be printed
when you just do..

ActiveWindow.SelectedSheets.PrintOut Copies:=1

Abdul Salam

Hi Folks

I am looking for a piece of code which will enable me to
print a selection, the selection being cells selected by
AutoFiltering cells.

At the moment I have code which filters cells, how do I
then set this range as the print area?

Any help appreciated.

Thanks
Will
.


Will Francis

Print Area Question
 
Thanks for that Abdul.

However, when I use the code, I get lots of blank lines
appearing after the filtered data (my sheet has formatting
which extends far beyond the end of the filtered data).

Ideally, I am looking to get the filtered data onto 1 page
if possible.

Thanks
Will
-----Original Message-----
Hi,


Only the visible cells (filtered data will be printed
when you just do..

ActiveWindow.SelectedSheets.PrintOut Copies:=1

Abdul Salam

Hi Folks

I am looking for a piece of code which will enable me to
print a selection, the selection being cells selected by
AutoFiltering cells.

At the moment I have code which filters cells, how do I
then set this range as the print area?

Any help appreciated.

Thanks
Will
.

.


Tom Ogilvy

Print Area Question
 
With ActiveSheet.PageSetup
.PrintArea = _
ActiveSheet.Autofilter.Range.Address(True,True,xlA 1,True)
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Activesheet.Printout


--
Regards,
Tom Ogilvy


Will Francis wrote in message
...
Thanks for that Abdul.

However, when I use the code, I get lots of blank lines
appearing after the filtered data (my sheet has formatting
which extends far beyond the end of the filtered data).

Ideally, I am looking to get the filtered data onto 1 page
if possible.

Thanks
Will
-----Original Message-----
Hi,


Only the visible cells (filtered data will be printed
when you just do..

ActiveWindow.SelectedSheets.PrintOut Copies:=1

Abdul Salam

Hi Folks

I am looking for a piece of code which will enable me to
print a selection, the selection being cells selected by
AutoFiltering cells.

At the moment I have code which filters cells, how do I
then set this range as the print area?

Any help appreciated.

Thanks
Will
.

.





All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com