Whenever I open the worksheet, I wish the current Month name row to be adjusted at the top of worksheet.
I entered month name in cell E2-January, then after 115 rows again cell E117-February and continue the naming with same interval. As it requires everyday entries and rechecks, the current month might be scrolled up or down.
Is it possible to have the current month Name row at the top whenever I open this worksheet?
Workbook_Open
: Scroll to Current Month's RowThisWorkbook
module.Option Explicit
Private Sub Workbook_Open()
Const WorksheetName As String = "GA"
Const RowOffset As Long = 115
Const FirstCellAddress As String = "A2"
Dim FirstCell As Range: Set FirstCell = Worksheets(WorksheetName) _
.Range(FirstCellAddress).Offset((Month(Date) - 1) * RowOffset)
Application.Goto FirstCell, True
End Sub
Sheet2(GA)
:Option Explicit
Private Sub Worksheet_Activate()
Const RowOffset As Long = 115
Const FirstCellAddress As String = "A2"
Dim FirstCell As Range: Set FirstCell = _
Range(FirstCellAddress).Offset((Month(Date) - 1) * RowOffset)
Application.Goto FirstCell, True
End Sub