View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Set print area problem

Hi Philip,

Try:

ActiveSheet.PageSetup.PrintArea = myprint.Address



---
Regards,
Norman



"Philip Reece-Heal" wrote in message
...
Trying to automate setting the print area on a sheet I use as a template
and am having problems.

The section of code is:

Set myprint = Range(mytop, mybot)
myprint.Select
ActiveSheet.PageSetup.PrintArea = myprint

While the required area is selected on screen OK, the last line gives me a
Run-time error '1004: Unable to set the PrintArea property of the
PageSetup class.

Have tried some alternatives but I'm stumped.

Any help would be appreciated

Regards
Philip