ªð¦^¦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

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-8-23 19:40 ½s¿è

¦^´_ 9# GBKEE
2007¤]¥i¨Ï¥ÎEvaluate

    firstworkday = CDate(Evaluate("WORKDAY(DATE(YEAR(TODAY()),1,0),1)"))
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD