View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Josh O. Josh O. is offline
external usenet poster
 
Posts: 77
Default Dynamic Print Area (ActiveSheet)

I am currently using the following code to set the print area in Sheet1 on my
workbook.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("Sheet1").PageSetup.PrintArea = Sheet1.Range("PrintArea").Address
End Sub


I would like to set this up to do the same thing for the Active Sheet a user
is on. I have tried a number of ways, but I need some help.

Any ideas?