Jens
Jens
Button ist doch die Aktion Private Sub CommandButton1_Click() und
Doppelklick Private Sub CommandButton1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
das sind doch schon zwei unterschiedliche Anfangspunkte.
Oder sehe ich das falsch.
Fruß Hajo
Private Sub Userform_Initialize()
Dim iList As Integer
With Worksheets("Leistungsstamm")
ComboBox1.List = .Range(.Cells(2, 2), .Cells(.UsedRange.Rows.Count, 2)).Value
End With
For iList = 0 To ComboBox1.ListCount
ComboBox1.ListIndex = iList
If Right(ActiveCell.Value, Len(ActiveCell.Value) - 8) Like ComboBox1.List(iList) Then
ComboBox1.ListIndex = iList
Exit For
End If
Next iList
End Sub
wenn die UserForm über CommandButton dann mit folgendem Code:
Private Sub Userform_Initialize()
With Worksheets("Leistungsstamm")
ComboBox1.List = .Range(.Cells(2, 2), .Cells(.UsedRange.Rows.Count, 2)).Value
End With
End Sub
hast du dazu eine Idee
Tschüß Jens
Definiere im einem Modul eine Variable mit Public Variable As Boolean
Gruß Hajo
Gruß Jens
den text
"Public Variable As Boolean "
in ein Modul zu Beginn schreiben
Gruß Hajo