Setting scroll area for multiple pages

  • Thread starter Thread starter JAMES SYLVESTERSR
  • Start date Start date
J

JAMES SYLVESTERSR

I have a workbook with 31 pages. Is there a way to set the scroll area
with one statement rather than setting it for each individual page? All
pages will have the same scroll area.

There are 15 other employees using a copy of the workbook and I need to set
the scroll area for each with a minimum of typing.


Thanks for your help.
 
Hi James,

This isn't quite one statement, but it's pretty close. Just change the
address of the scroll area to fit your needs.

Sub SetScrollArea()
Dim wksSheet As Worksheet
For Each wksSheet In ActiveWorkbook.Worksheets
wksSheet.ScrollArea = "$A$1:$E$10"
Next wksSheet
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
James

Just a note on Rob's code.

The scrollarea property will not stick when closing and re-opening the
workbook.

May be easier to put the code in the Workbook_Open in ThisWorkbook or in
Auto_open in a general module.

Gord Dibben Excel MVP
 
Back
Top