|
以下のような感じでは如何ですか。
Dim strListDay As String
Dim datEndDate As Date, datDate As Date
Dim intOffset As Integer, intWeek As Integer
datEndDate = DateAdd("m", 2, Date)
intOffset = Abs((10 - Weekday(Date)) Mod 7)
Do
datDate = Date + intOffset + 7 * intWeek
If datEndDate < datDate Then Exit Do
strListDay = strListDay & Format(datDate, "yyyy/mm/dd") & ";"
datDate = datDate + 1
If datEndDate < datDate Then Exit Do
strListDay = strListDay & Format(datDate, "yyyy/mm/dd") & ";"
intWeek = intWeek + 1
Loop
[コンボ].RowSource = strListDay
|
|