Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programmatically set print area in Excel

I have a spreadsheet that contains accuracy information for projects
based. Column A is the date column and columns B-BF are for reporting
pass/fail results for several workgroups. The top 3 rows contain the
sums of pass/fail, the percent of pass, and the workgroup name.

I would like to be able to set the print area to programmatically
decide the last 10 working days worth of information to print.

Any assistance would be appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Programmatically set print area in Excel

If the working days/dates in Column A in ascending order:

Sub SetPrintArea()
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Cells(Lastrow - 9, 1).Resize(10, 58).Select
ActiveSheet.PageSetup.PrintArea = Selection

End Sub

msunder wrote:
I have a spreadsheet that contains accuracy information for projects
based. Column A is the date column and columns B-BF are for reporting
pass/fail results for several workgroups. The top 3 rows contain the
sums of pass/fail, the percent of pass, and the workgroup name.

I would like to be able to set the print area to programmatically
decide the last 10 working days worth of information to print.

Any assistance would be appreciated.


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
split print area in excel - One Page Print Cyhill Excel Worksheet Functions 3 November 12th 08 08:39 PM
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
Macro - Set Print Area for Changing Data Area ksp Excel Programming 5 May 15th 06 10:20 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 12:57 PM.

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

About Us

"It's about Microsoft Excel"