View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lisa Lisa is offline
external usenet poster
 
Posts: 328
Default Script to Print Range of Cells

I have tried this, and am closer, but it shows the print preview within the
excel sheet, and gives me no options. I have to hit esc to get out.


Private Sub CommandButton4_Click()
Application.ScreenUpdating = False
ActiveSheet.Range("SpecialOrderForm").AutoFilter Field:=1, Criteria1:="<"
Range("GG2500:GM2745").Select
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "gg").End(xlUp).Row
.Range("gg2500:gm2745").PrintOut preview:=True
End With
Range("SpecialOrderForm").Select

End Sub


"Lisa" wrote:

Hi all -

I have the default print area already set for a certain space. I need to
write a script for a 2nd print area. Here is what I have so far...but am at
a loss as to have it show up correctly in print preview.

Any Help is Greatly Appreciated!

Private Sub
Application.ScreenUpdating = False
ActiveSheet.Range("GG2500:GM2745").AutoFilter Field:=1, Criterial:="<"
Range("GG2500:GM2745").Select
Application.PrintPreview

End Sub