View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lynn Arlington Lynn Arlington is offline
external usenet poster
 
Posts: 9
Default protected worksheet

In the code I would put a selection command

Range("b2").Select
Selection.End(xlDown).Select
lastrow = ActiveCell.Row

ActiveSheet.PageSetup.PrintArea = "$A$1:$G$ & lastrow"

Lynn


"LennyG" wrote:

I have prepared a worksheet for user entry in which there are formulas.
The worksheet is protected and I am trying to have interim reports printed
using a
macro. When the current region is selected in the macro, the entire area
including
empty cells with the formulas copied, is selected. How do I get the print
area to
stop at the point where data has been entered, excluding the empty,
formatted rows.