'https://stackguides.com/questions/54374272/vba-workbook-open-for-specific-date-current-date
'VBA Workbook_Open for Specific Date (Current Date)
Sub CreateWorkbookWith31Sheets()
Dim wb As Workbook
Dim ws As Worksheets
Dim iCt As Integer
Set wb = Workbooks.Add
With wb.Worksheets
For iCt = 1 To .Count
wb.Worksheets(iCt).Name = iCt
wb.Worksheets(iCt).Range("B2").Value = DateSerial(2019, 1, iCt)
wb.Worksheets(iCt).Range("B2").NumberFormat = "m/d/yyyy"
Next iCt
For iCt = iCt To 31
.Add After:=wb.Worksheets(.Count)
wb.Worksheets(iCt).Name = iCt
wb.Worksheets(iCt).Range("B2").Value = DateSerial(2019, 1, iCt)
wb.Worksheets(iCt).Range("B2").NumberFormat = "m/d/yyyy"
Next iCt
End With
ActiveWorkbook.SaveAs Filename:="C:\mySpecialFolder\my31days.xlsb", _
FileFormat:=xlExcel12
End Sub
'Copy this Subroutine to "ThisWorkbook" of the newly created workbook
Private Sub Workbook_Open()
Dim actDay As Integer
actDay = Format(Date, "d")
Worksheets(actDay).Activate
End Sub
=> This workbook will open and activate the
. sheet "26" if today is the 26th of the month!