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

Thanks Sebastian; this was exactly what i was looking for.

"sebastienm" wrote:

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