This function will return the first day of the next month for the date supplied to the parameter.
The function takes the following parameters:
Required StartingDate As Date
Figure 1
This function is ideal for creating a report that has monthly periods in columnar format. For example, if a company’s year start is 1/11/2014, and a monthly trial balance report is to be created, the function can be used in the following way:
M1start = 01/11/2014
M2start = FirstOfNextMonth(M1start)
M3start = FirstOfNextMonth(M1start)
M4start = FirstOfNextMonth(M1start)
M5start = FirstOfNextMonth(M1start)
M6start = FirstOfNextMonth(M1start)
M7start = FirstOfNextMonth(M1start)
M8start = FirstOfNextMonth(M1start)
M9start = FirstOfNextMonth(M1start)
M10start = FirstOfNextMonth(M1start)
M11start = FirstOfNextMonth(M1start)
M12start = FirstOfNextMonth(M1start)
M1end = M2start - 1
M2end = M3start - 1
M3end = M4start - 1
M4end = M5start - 1
M5end = M6start - 1
M6end = M7start - 1
M7end = M8start - 1
M8end = M9start - 1
M9end = M10start - 1
M10end = M11start - 1
M11end = M12start - 1
M12end = FirstOfNextMonth(M12start) - 1