View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Keep Consistent cell positions on screen across tabs

Hi,
Witrhin the ThisWorkbook code module, you can track the active selected cell
and adjust the selection when a sheet activates.; see code below (assumes
sheets are worksheets, not chartsheets)

'-------- In ThisWOrkbook code module --------------------------
Private mActiveCell As Range

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Not mActiveCell Is Nothing Then
Application.ScreenUpdating = True
Application.Goto Sh.Range(mActiveCell.Address), True
End If
End Sub


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
'assumes sh is worksheet and not chart
Set mActiveCell = Target
End Sub
'---------------------------------------------------------
--
Regards,
Sébastien
<http://www.ondemandanalysis.com