Code: Select all
Private Sub FILL_GIORNI()
Dim myVar As String
Dim StartDate As Date
Dim EndDate As Date
Dim ThisDate As Date
myVar = MESE & "-" & ANNO
StartDate = CDate(myVar)
EndDate = DateAdd("d", -1, DateAdd("m", 1, StartDate))
With Me.CGIORNO
.Clear
For ThisDate = StartDate To EndDate
.AddItem UCase(Format$(ThisDate, "DDD")) & "-" & ThisDate
Next
End With
End Sub
similar:
FILL_GIORNI(cmycombobox)