Gruppe
Dialog
Problem
Mit der ersten Schaltfläche soll das DropDownfeld gefüllt, mit der zweiten soll der aktuelle Werte ausgelesen werden.
StandardModule: Modul1
Sub SetValues()
Dim iMonth As Integer
With ActiveSheet.DropDowns(1)
.RemoveAllItems
For iMonth = 1 To 12
.AddItem Format(DateSerial(1, iMonth, 1), "mmmm")
Next iMonth
.ListIndex = 1
End With
End Sub
Sub GetValue()
With ActiveSheet.DropDowns(1)
If .ListIndex > 0 Then
MsgBox .List(.ListIndex)
End If
End With
End Sub