Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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
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
Series display order sequential, not grouped side-by-side [email protected] Charts and Charting in Excel 2 November 21st 08 02:22 PM
how to display two spread sheets side by side Andrea Gates New Users to Excel 4 January 13th 08 06:39 PM
How do I display columns side-by-side in a two Y axis chart? Kristin C Charts and Charting in Excel 3 April 5th 06 12:35 PM
Display columns side by Side in the Data Area of a Pivot table Sue Excel Discussion (Misc queries) 1 March 21st 06 02:12 AM
Compare Side by Side with 3 simulatanous sheets scrolling John Louis Excel Worksheet Functions 0 October 11th 05 12:31 PM


All times are GMT +1. The time now is 08:40 PM.

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

About Us

"It's about Microsoft Excel"