|
こんなのでは?
但し、Findに因る日付の探索部分は上手く行くか、行かぬか見て居ません
Dim i As Long
Dim c As Range
Dim fAddress As String
With Sheets(Cmbチーム名.Value).Cells
Set c = .Find(What:="*/*", lookat:=xlPart)
If Not c Is Nothing Then
fAddress = c.Address
Do
vntDate = c.Value
For i = 0 To Cmb開催日1.ListCount - 1
If Format(vntDate, "mmdd") _
>= Format(CDate(Cmb開催日1.List(i, 0)), "mmdd") Then
Exit For
End If
Next i
If i <= Cmb開催日1.ListCount - 1 Then
If Format(vntDate, "m/d") <> Cmb開催日1.List(i, 0) Then
Cmb開催日1.AddItem Format(vntDate, "m/d"), i
End If
Else
Cmb開催日1.AddItem Format(vntDate, "m/d")
End If
' Cmb開催日1.AddItem Format(c.Value, "m/d")
Set c = .FindNext(c)
If c.Address = fAddress Then Exit Do
Loop
End If
End With
|
|