Private Sub Workbook_NewSheet(ByVal sh As Object)
Workbook_SheetActivate sh
End Sub
Private Sub Workbook_SheetChange(ByVal sh As Object, ByVal t As Range)
Workbook_SheetActivate sh
End Sub
Private Sub Workbook_SheetActivate(ByVal sh As Object)
On Error Resume Next
Dim lr&, lc&, rg, r As Range: Set rg = sh.UsedRange
lr = rg.Row + rg.Rows.Count - 1: lc = rg.Column + rg.Columns.Count - 1
Set r = GetLastCell(sh.cells(1, 1).Resize(lr, lc))
lr = r.Row + 5: lc = r.Column + 3
If lr < 30 Then lr = 30
If lc < 15 Then lc = 15
sh.ScrollArea = sh.cells(1, 1).Resize(lr, lc).Address
End Sub
Private Function GetLastCell(ByVal cells As Range, _
Optional LookIn As XlFindLookIn = xlValues, _
Optional LookAt As XlLookAt = xlWhole, _
Optional SearchDirection As XlSearchDirection = xlPrevious) As Range
On Error Resume Next
Dim r As Range:
Set r = cells.Find("*", after:=cells(1, 1), LookIn:=LookIn, LookAt:=LookAt, SearchDirection:=SearchDirection, SearchOrder:=xlByRows)
If Err = 0 Then Set GetLastCell = r
Err.Clear
End Function