DateSerial

Public Function DateSerial(ByVal Year As Long, ByVal Month As Long, ByVal Day As Long, Optional ByVal Hour As Long = 0, Optional ByVal Minute As Long = 0, Optional ByVal Second As Long = 0) As Date

Creates a date/time with the specified parameters. These parameters can have any value (both positive and negative)

Dim lYear = Year(Date)
Dim lMonth = Month(Date)
Dim lDay = Day(Date)

SendDebug $"The current date is {DateSerial(lYear, lMonth, lDay)}"
SendDebug $"The first day of this month is {lYear, lMonth, 1}"
SendDebug $"The last day of this month is {lYear, lMonth + 1, 0}"
SendDebug $"Tomorrow is {lYear, lMonth, lDay + 1}"
SendDebug $"A week ago was {lYear, lMonth, lDay - 7}"
SendDebug $"The first day of the next year is {lYear + 1, 1, 1}"

See also: