M
Mary Branson
I would like to write a macro using VBA to set print ranges
dynamically. I have several macros that create spreadsheets based
upon the number of rows in the data, which I store in a range. I can
copy formulas down and format the data using offsets, but I cannot
figure out how to set the print area using VBA code. If I record a
macro, it requires an absolute reference. Is it possible to use a
range name or variable to set the print area? If not, is there
another way to format my report to print to one page, without manually
changing it?
I'm using Excel 2000 on Win2K and WinXP machines. I can post some
sample code if necessary, let me know what you'd like to see.
dynamically. I have several macros that create spreadsheets based
upon the number of rows in the data, which I store in a range. I can
copy formulas down and format the data using offsets, but I cannot
figure out how to set the print area using VBA code. If I record a
macro, it requires an absolute reference. Is it possible to use a
range name or variable to set the print area? If not, is there
another way to format my report to print to one page, without manually
changing it?
I'm using Excel 2000 on Win2K and WinXP machines. I can post some
sample code if necessary, let me know what you'd like to see.