The information in this article applies to:
SUMMARY
To determine the number of days in a specified month, use the following
Microsoft WordBasic macro Select Case structure.
This macro prompts for a date in the mm/dd/yy format and returns
the number of days in the specified month. The Month function is used
to determine the month number for the specified date. Then depending
on the month number (1-12), a message box posts the number of days in
the month.
The macro takes leap years into consideration when computing the number of days in the month of February.
The year is divided by 4 and if the remainder is 0, the number of days
in the month is 29 days.
Additional query words: month day datevalue
Keywords : kbmacro kbmacroexample winword word6 word7 word95 |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |