Macro for Print Area

M

misskh

Hi,

I want to write a macro to automatically set the print area of a
particular page.

The page changes in size each day. I want to use the current region
function.

Can someone please help me with this.
 
J

john

from the VBA helpfile:

This example sets the print area to the current region on Sheet1. Note that
you use the Address property to return an A1-style address.

Worksheets("Sheet1").Activate
ActiveSheet.PageSetup.PrintArea = _
ActiveCell.CurrentRegion.Address
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top