View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Print area Macro

Hi,
Try this, hope it helps.
Sub Corner1()
Cells.Find(What:="corner", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Corner = ActiveCell.Address
ActiveSheet.PageSetup.PrintArea = "$A$1:" & Corner
End Sub

Thanks,

"Paul H" wrote:

I want to print a sheet with the upper left point being A1 with the bottom
right point variable. I could put a word in the cell (i.e. corner), I need
a macro to look through the sheet and find the word "corner" this would then
be used as the bottom right point for the print setup. Any ideas?