LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How can I print from cell A1 to the last row ?

Thanks to all for their help so far. I can find the last row okay, but how
can I now print from cell A1 through to the last row +2, column 24 ?

Dim IngLastRow As Long
With Sheets("Report(metArb)")
lngLastRow = .Cells(Rows.Count, "B").End(xlUp).Row + 2
End With

.... that finds the last row, but to print from A1 to the lastrow+2 (which is
IngLastRow) is it

ActiveSheet.PageSetup.PrintArea = "$A$1:" & "IngLastRow+2,24"

thanks again ... Roger



 
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
Cell borders do not print on one side of print area?? alan82 Excel Discussion (Misc queries) 4 May 3rd 23 07:42 PM
Macro to hide rows with a certain cell empty then set print area and print tahrah Excel Programming 12 January 9th 07 03:47 AM
cell borders that I create dont show on print preview or print scott3435 Excel Discussion (Misc queries) 2 April 6th 06 02:37 AM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM
Excel cell looks good in print preview but doesn't print??? Jack Gathright Excel Discussion (Misc queries) 1 September 13th 05 12:38 PM


All times are GMT +1. The time now is 10:37 AM.

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"