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

¦A¦¸½Ð°Ý¤@¤U....

¨C¤ë²Ä¤G­Ó§«ô¤@¡A§Ú¬O¥Îºâªº¡A´£¨Ñµ¹±z°Ñ¦Ò¡C

Sub nn()

Dim startdate As Date
Dim temp As Date

startdate = "2010/1/1"
currentmonth = 1
startcell = 1

Dim firstMonday As Boolean
firstMonday = False

For i = 0 To 365

temp = startdate + i

If currentmonth <> Month(temp) Then
GoTo forend
End If

If Weekday(temp, vbMonday) = 1 Then
    If firstMonday = False Then
    firstMonday = True
    GoTo forend
    End If

    Cells(startcell, 1) = temp
    startcell = startcell + 1
    firstMonday = False
    currentmonth = currentmonth + 1
End If

forend:
Next

End Sub

TOP

        ÀR«ä¦Û¦b : ºÉ¦h¤Ö¥»¥÷¡A´N±o¦h¤Ö¥»¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD