ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¨C¦~ªº²Ä¤@­Ó¤u§@»P³Ì«á¤@­Ó¤u§@¤Ñ

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2010-8-23 22:19): Åwªï¶Q«È¥úÁ{

¦U¦ì§A¦n, ªì¨ì¶Q¹Ò

³Ì«á¤@­Ó¤u§@¤Ñ
  1. Function LastFridayInMonth(lngYear As Long, lngMonth As Long) As Date
  2.     Dim lngLastDay As Long
  3.     'define last day of the month of interest:
  4.     lngLastDay = DateSerial(lngYear, lngMonth + 1, 0)
  5.     'use to get last friday:
  6.     LastFridayInMonth = lngLastDay - WeekDay(lngLastDay, vbFriday) + 1
  7. End Function

  8. Sub Check_Last_WorkDay()

  9. MsgBox LastFridayInMonth(2011, 12)

  10. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD