J
John
I recorded a macro (relative cell reference)
by finding a certain cell by a "find" criterion,
and then shading it with a shift-end-left arrow
and a shift-end-up arrow. I then set this as the print
area and printed it. So far so good. Before finishing the
macro I deleted the Print area from the name box
so that the spreadsheet would be exactly the same
after I cleared the contents, and ready to use again.
When I used a different file with a different number
of records and tried the use the macro, the print
job included only the number of rows in the original
macro. ( Remember I did use a relative reference when
recording). When I looked at the Visual Basic
I saw that the macro recorder recorded the static
cell addresses for the print area (A1:F12, for example).
I thought next, that if I range-named the block before
setting it as the print area that that might work.
No luck.
Is there a trick to shading an area while recording a
relative cell reference macro so that the print area
confoms to the newly defined (shaded) area each time?
Suggestions Welcome, Solutions Moreso.
Thanks
by finding a certain cell by a "find" criterion,
and then shading it with a shift-end-left arrow
and a shift-end-up arrow. I then set this as the print
area and printed it. So far so good. Before finishing the
macro I deleted the Print area from the name box
so that the spreadsheet would be exactly the same
after I cleared the contents, and ready to use again.
When I used a different file with a different number
of records and tried the use the macro, the print
job included only the number of rows in the original
macro. ( Remember I did use a relative reference when
recording). When I looked at the Visual Basic
I saw that the macro recorder recorded the static
cell addresses for the print area (A1:F12, for example).
I thought next, that if I range-named the block before
setting it as the print area that that might work.
No luck.
Is there a trick to shading an area while recording a
relative cell reference macro so that the print area
confoms to the newly defined (shaded) area each time?
Suggestions Welcome, Solutions Moreso.
Thanks