View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mary Branson Mary Branson is offline
external usenet poster
 
Posts: 2
Default Setting a print range using variables

(Mary Branson) wrote in message . com...
I would like to write a macro using VBA to set print ranges
dynamically.


Here's the code I finally used (I will substitute variables in for the numbers):

ActiveSheet.PageSetup.PrintArea = Range(Cells(1, 1), Cells(22, 50)).Address

Thanks for all the help!