Gruppe
Dialog
Bereich
ComboBox
Thema
Prozentwerte in UserForm-ComboBox einlesen
Problem
In eine UserForm-ComboBox sollen Prozentwerte eingelesen werden.
Lösung
Geben Sie den Ereigniscode in das Klassenmodul der UserForm ein.
ClassModule: frmPercent
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim iRow As Integer
iRow = 1
Do Until IsEmpty(Cells(iRow, 1))
cboPercent.AddItem Cells(iRow, 1).Text
iRow = iRow + 1
Loop
With cboPercent
If .ListCount > 0 Then
.ListIndex = 0
End If
End With
End Sub
StandardModule: Modul1
Sub DialogAufruf()
frmPercent.Show
End Sub