Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Two Sheets to Display Side by Side
I often want to display two workbooks side by side. I know how to use the
window command and display all teh open workbooks, but this is a pain because I often have numerous workbooks open. I then have to downbar all the ones I don't want to see. Is there a command to display two sheets side by side? I could probably figure out how to write code to let me select the two sheets I want. Maybe someone has already done this. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Two Sheets to Display Side by Side
Give the following macro a try. First, select two worksheets (select first
worksheet, then Ctrl-Click second worksheet's tab); then, run the macro... all workbooks other than the active one will be minimized, the active workbook will be duplicated and tiled, and the two selected sheets will become the active sheet in each displayed window. Sub DisplaySameWorksheetSideBySide() Dim WB As Workbook, FirstSheet As String, SecondSheet As String With ActiveWorkbook.Windows(1) If .SelectedSheets.Count < 2 Then MsgBox "You must select two sheets in this workbook!" Exit Sub End If FirstSheet = .SelectedSheets(1).Name SecondSheet = .SelectedSheets(2).Name End With For Each WB In Workbooks If WB.Name < ActiveWorkbook.Name Then Windows(WB.Name).WindowState = xlMinimized Else Windows(WB.Name).WindowState = xlNormal End If Next ActiveWorkbook.NewWindow Application.Windows.Arrange xlArrangeStyleVertical Windows(ThisWorkbook.Name & ":1").Parent.Worksheets(FirstSheet).Select Windows(ThisWorkbook.Name & ":2").Parent.Worksheets(SecondSheet).Select End Sub -- Rick (MVP - Excel) "mcambrose" wrote in message ... I often want to display two workbooks side by side. I know how to use the window command and display all teh open workbooks, but this is a pain because I often have numerous workbooks open. I then have to downbar all the ones I don't want to see. Is there a command to display two sheets side by side? I could probably figure out how to write code to let me select the two sheets I want. Maybe someone has already done this. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Series display order sequential, not grouped side-by-side | Charts and Charting in Excel | |||
how to display two spread sheets side by side | New Users to Excel | |||
How do I display columns side-by-side in a two Y axis chart? | Charts and Charting in Excel | |||
Display columns side by Side in the Data Area of a Pivot table | Excel Discussion (Misc queries) | |||
Compare Side by Side with 3 simulatanous sheets scrolling | Excel Worksheet Functions |