Set Print Area programatically
Syntax is OK; are you sure NoOfRows gives the correct result? If it is 0,
this would give "Application defined or object defined error."
"Mervyn Thomas" wrote:
Can anyone help me get the syntax right. I have tried variations on the
theme:
Range(Cells(1, 1), Cells(NoOfRows, 29)).Select
ActiveSheet.PageSetup.PrintArea = Selection
but cannot get anything past the debugger!
Thanks
mervyn
|