Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
.

.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 4 April 23rd 23 09:04 PM
Another Print Area question curiosity_killed_the_cat[_2_] Excel Discussion (Misc queries) 3 January 29th 08 09:35 PM
Print Area Macro Question Vick Excel Discussion (Misc queries) 2 December 8th 07 01:02 AM
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM


All times are GMT +1. The time now is 09:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"