View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
kkknie[_62_] kkknie[_62_] is offline
external usenet poster
 
Posts: 1
Default Help recording a macro to define print area

I'm assuming you recorded a find to get something like:

Cells.Find(What:="a", After:=ActiveCell, LookIn:=xlFormulas
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
MatchCase:=False _
, SearchFormat:=False).Activate

If so, first change the .Activate to .Select

Assuming you wanted to select the found row plus the next 11 rows an
the found column plus the next 5 columns, use the following line o
code to make the selection which would be used to set your print area.

Range(Selection, Cells(Selection.Row + 11, Selection.Column
5)).Select

Modify to meet your needs.



--
Message posted from http://www.ExcelForum.com