ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting scroll area for multiple pages (https://www.excelbanter.com/excel-programming/290925-setting-scroll-area-multiple-pages.html)

JAMES SYLVESTERSR[_2_]

Setting scroll area for multiple pages
 
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.


Rob Bovey

Setting scroll area for multiple pages
 
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 SYLVESTERSR" <sylvester1501(remove wrote in
message hlink.net...
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.




Gord Dibben

Setting scroll area for multiple pages
 
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

On Tue, 10 Feb 2004 11:28:42 -0800, "Rob Bovey" wrote:

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




All times are GMT +1. The time now is 07:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com