Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Klarissa Schmidt   on Jan 02 In MS Office Category.

  
Question Answered By: Nathaniel Martin   on Jan 02

A cleaner version is attainable since the range  is explicitly called by the
worksheet index. With the worksheet references, you don't have to 'change' to
each worksheet so you are saving process cycles from the screen refreshes that
would have taken place. You could also set ScreenUpdating to false & then back
to True; does the same thing! Anyway see if this version makes sense:

Sub SetPrintAreaAllSheets3()

Dim vPrintrange As String

For SheetIndex = 1 To ActiveWorkbook.Sheets.Count

vPrintrange = "A1:" & Sheets(SheetIndex).Cells.SpecialCells(xlLastCell).Address

Sheets(SheetIndex).PageSetup.PrintArea = vPrintrange 'Set the print  range

Next SheetIndex

End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Print Range Or get search suggestion and latest updates.


Tagged: