View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Set Print Area programatically

It miss
..Address after selection

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Mervyn Thomas" wrote in message ...
I thought so too! but the other reply does work
Mervyn
"K Dales" wrote in message ...
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