Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default How to iterate through sheets and set ActiveWindow

Hi,

How do you iterate through the sheets in a weekbook and set each sheet
to the ActiveWindow?

(I need to assign the scrollrow for each sheet.)

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default How to iterate through sheets and set ActiveWindow

For Each Sheet In Sheets
MsgBox Sheet.Name
' your code here
Next 'Sheet

Regards

Trevor


wrote in message
oups.com...
Hi,

How do you iterate through the sheets in a weekbook and set each sheet
to the ActiveWindow?

(I need to assign the scrollrow for each sheet.)

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default How to iterate through sheets and set ActiveWindow

Hello There, Try this code in the Workbook_Open event, Should fix you
right up...

enjoy, Rick


Private Sub Workbook_Open()
Dim wsk As Worksheet

Application.ScreenUpdating = False

For Each wsk In Worksheets
If wsk.Name < "Test " Then
wsk.Select
wsk.ScrollArea = "a1:n31" '' << Change Range here
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
End If
Next wsk


End Sub






wrote in message
oups.com...
Hi,

How do you iterate through the sheets in a weekbook and set each sheet
to the ActiveWindow?

(I need to assign the scrollrow for each sheet.)

Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting ScrollRoll without ActiveWindow [email protected] Excel Programming 1 February 24th 06 12:02 AM
VBA ActiveWindow.WindowState Problem JK Excel Programming 2 February 3rd 05 01:21 AM
Problem with using the ActiveWindow property - sometimes Ragnar Midtskogen Excel Programming 1 November 24th 04 02:37 PM
ActiveWindow.SelectedSheets.PrintPreview HelpMe Excel Programming 0 November 17th 04 03:53 PM
Using ActiveWindow.PointsToScreenPixelsY Pancho Excel Programming 5 February 7th 04 11:23 PM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"