View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Grouped Sheets - Windows Arrange

I think Dave F. was answering a question about arranging the tabs at the bottom
of the window--not arranging the actual windows themselves.

Maybe something like this:

Option Explicit
Sub testme()

Dim mySelectedSheets As Sheets
Dim iCtr As Long

Set mySelectedSheets = ActiveWindow.SelectedSheets

If mySelectedSheets.Count = 1 Then
Exit Sub
End If

mySelectedSheets(1).Select

For iCtr = 2 To mySelectedSheets.Count
ActiveWindow.NewWindow
mySelectedSheets(iCtr).Select
Next iCtr

ActiveWorkbook.Windows.Arrange ArrangeStyle:=xlHorizontal 'xlVertical

End Sub


(I found it easier to see the results using horizontal.)

JMay wrote:

Is it be possible to Select a given number of Sheets (Group,
NonContiguous limit to two) say for example sheet1 and sheet3) and run a
macro that would Show them Vertically arranged?

Any assistance appreciated,


--

Dave Peterson