Thread: PRINTING
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
NILELATOR NILELATOR is offline
external usenet poster
 
Posts: 12
Default PRINTING

sounds good, i tried rondebruin's fix that's on his site
www.rondebruin.nl/print i don't know if i did it wrong or what, this is the
first time for me to go into code and micro writing so i don't know if i'm
doing it right

"JLatham" wrote:

If you have one particular column that you could use to determine the last
row actually used on the sheet, then you could use this macro as the basis
for a routine you could call before printing the sheet to redefine the print
area:

Change the A and K entries to include the actual columns to be printed, and
change the "B" to whatever column you know will be the longest one (one with
data farthest down the sheet) and it should work. If for some reason you
aren't starting your printout with row 1, then change the "1:" to the first
row to be printed?

You could put this as a general macro to be called manually, or use the body
of it as the basis (needs some modification) within the workbook's
"BeforePrint" event handler.

Sub SetPrintRange()
'
Dim NewPrintRange As String
Const FirstColumnToPrint = "A" 'change as required
Const LastColumnToPrint = "K" ' change as required
Const LongestColumn = "B" ' change as required
'assumes printing from row 1

NewPrintRange = FirstColumnToPrint & "1:" & _
LastColumnToPrint & _
Trim(Str(Range(LongestColumn & "65536").End(xlUp).Row))
ActiveSheet.PageSetup.PrintArea = NewPrintRange
End Sub

"NILELATOR" wrote:

I MADE A SPREAD SHEET TO TRACK JOBS THAT WE BID. I SET UP ALL THE FORMULAS SO
ACCOMADATE 1500 JOBS. THE PROBLEM IS THATS 31 PAGES AND I DON'T WANT TO PRINT
ALL OF THEM UNLESS THERE'S INFO ON THE PAGES IS THERE ANY SETTING OTHER THAN
"SET PRINT AREA" SO IT WILL ONLY PRINT WHAT HAS INFORMATION ON IT