View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default macro print area

Not too sure what your issue might be. It works at my end...
Change printOut to PrintPreview while you are debugging to save paper. Try
stepping through the code one line at a time checking print settings as you
go...
--
HTH...

Jim Thomlinson


"Curt" wrote:

D made a difference all right. Don't know what is happening. Prints twice.
first run 2 sheets go to 100 next set 2 sheets stops as it should. last row
column (B) Ain't we got fun?

"Jim Thomlinson" wrote:

SorryI missed the "D". Should be...

with Sheets("Check_In")
.PageSetup.PrintArea = "A2:D" & Cells(Rows.Count, "B").End(xlUp).Row
.PrintOut
.PageSetup.PrintArea = ""
end with
--
HTH...

Jim Thomlinson


"Curt" wrote:

found one error was a colon after a2 printed thru not useing b count as stop
Thanks

"Jim Thomlinson" wrote:

I am a little unclear what you want but here goes. You want to print Cells
A2:D?? where ?? is the last row in column B with a value in it... If so then

with Sheets("Check_In")
.PageSetup.PrintArea = "A2:" & Cells(Rows.Count, "B").End(xlUp).Row
.PrintOut
.PageSetup.PrintArea = ""
end with

--
HTH...

Jim Thomlinson


"Curt" wrote:

Have entries in column (A) want to stop column (A) at last row of entries in
column (B) looking thru site was unable to find an answer. site got me this
far. do need the column (A) entries. This is code I am useing.
Thanks To All

Sheets("Check_In").Select
LastRow = Cells(Rows.Count, "C").End(xlUp).Row
Range("A2:D2").Resize(LastRow - 1).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.PrintArea = ""
Range("F19").Select