Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to "Set Print Area" in Excel / VBA

Status
Not open for further replies.

wrbodine

Programmer
Aug 24, 2000
302
US
How can I, through VBA code, set the print area (File - Print Area - Set Print Area)?
 
Hi!

Code;
ActiveSheet.PageSetup.PrintArea = "$A$1:$B$6"

For the area A1:B6

Tip; use Register Macro, do the tings you want, finish registering, and then edit the Code. Excel is fantastic in that way;-)

Have fun, Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top