I have a Spreadsheet (Excel 2000) which creats a table 8 columns wide by a variable number of rows (can be as small as 5 or 300-400)with the two top rqws being the table headers. The number of the last row is held in a separate cell. The table may have blank lines.
I need to be able to set the print area as part of a macro.
However the printarea code reqires (as far as I can make out)the range to be specified in terms such as $A$1:$H$76.
but how do I get to this if I know one addres as (say)$A$4 but the other only in terms of the column (8) and the row - a variable held in (say)square G8.
PrintArea = $A$1:Cells(myvariable,8)doesn't work neither does Printarea = $A$1:ActiveCell.Address - any ideas anyone?
I need to be able to set the print area as part of a macro.
However the printarea code reqires (as far as I can make out)the range to be specified in terms such as $A$1:$H$76.
but how do I get to this if I know one addres as (say)$A$4 but the other only in terms of the column (8) and the row - a variable held in (say)square G8.
PrintArea = $A$1:Cells(myvariable,8)doesn't work neither does Printarea = $A$1:ActiveCell.Address - any ideas anyone?