- ©«¤l
- 26
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 52
- ÂI¦W
- 0
- §@·~¨t²Î
- Mac OS X
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-8-13
- ³Ì«áµn¿ý
- 2010-10-29
|
¨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 |
|