Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Duane
 
Posts: n/a
Default Navigating in Excel sheets

I have several worksheets which are the same layout, with different
information, all related. I would like to move around in one sheet, and when
i go to another sheet, have the same position displayed. I do not want any
changes I make to a cell on one sheet to hard enter on the other sheet, so
highlighting all the tabs is not an option.

I would like that when I go to another sheet, the same cell is in the window
to see the effects, rather than scroll around to find it.


  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Navigating in Excel sheets

If you want to use a couple of macros, you can do it.

Option Explicit
Dim CurActCellAddr As String
Dim TopLeftCellAddr As String
Private Sub Workbook_Open()
CurActCellAddr = ActiveCell.Address
TopLeftCellAddr = ActiveWindow.VisibleRange.Cells(1, 1).Address
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If CurActCellAddr = "" Then
'do nothing
Else
With Application
.EnableEvents = False
If TopLeftCellAddr = "" Then
'do nothing
Else
.Goto Sh.Range(TopLeftCellAddr), scroll:=True
End If
Sh.Range(CurActCellAddr).Select
.EnableEvents = True
End With
End If
CurActCellAddr = ActiveCell.Address
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
CurActCellAddr = ActiveCell.Address
TopLeftCellAddr = ActiveWindow.VisibleRange.Cells(1, 1).Address
End Sub


rightclick on the excel icon to the left of the File|edit|view (on the worksheet
menubar).
select view code and paste this in.

Then try it out.

The first time the address gets initialized is with the workbook open event. If
you test without closing/reopening your workbook, it may take one selection
change to "prime the pump."

Duane wrote:

I have several worksheets which are the same layout, with different
information, all related. I would like to move around in one sheet, and when
i go to another sheet, have the same position displayed. I do not want any
changes I make to a cell on one sheet to hard enter on the other sheet, so
highlighting all the tabs is not an option.

I would like that when I go to another sheet, the same cell is in the window
to see the effects, rather than scroll around to find it.


--

Dave Peterson
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
How to save sheets in new excel files, automatically? SuperDuck Excel Worksheet Functions 1 October 22nd 05 09:37 AM
Using Access database to "populate" Excel Sheets maacmaac Excel Discussion (Misc queries) 1 September 19th 05 05:06 PM
Opening multiple Excel files that contain varied selected sheets MLBrownewell Excel Worksheet Functions 0 September 14th 05 05:48 PM
How can I merge multiple sheets from different Excel files workbo. jones021 Excel Worksheet Functions 0 April 20th 05 08:48 PM
Create New Microsoft Excel Worksheet Has 3 Sheets Bassam Setting up and Configuration of Excel 0 February 9th 05 08:51 PM


All times are GMT +1. The time now is 04:17 AM.

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"