Setting Row to be = to another Worksheet?
I put this in a general module:
Option Explicit
Public ProgramSummaryRowNumber As Long
I put this behind the programsummary worksheet:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ProgramSummaryRowNumber = ActiveWindow.ScrollRow
End Sub
I put this behind the unnamed sheet:
Option Explicit
Private Sub Worksheet_Activate()
If ProgramSummaryRowNumber 0 Then
ActiveWindow.ScrollRow = ProgramSummaryRowNumber + 8
End If
End Sub
If I went to the programsummary worksheet first, selected a different cell, then
went to the other sheet, it worked fine.
CRayF wrote:
Assuming:
Dim srcProgramSummaryWs As Worksheet
Set srcProgramSummaryWs = Sheets("ProgramSummary")
In the Private Sub Worksheet_Activate() can you immediately set the
ActiveWindow.ScrollRow to be the same as that of the srcProgramSummaryWs (+8
rows)?
--
Dave Peterson
|