Im Prinzip soll durch die Auswahl in Combobox1 die Listfillrange in Combobox2 bestimmt werden.
Für Produkt 1 funktioniert das auch hervorragend, für alle weiteren Fälle bleibt die Combobox2 leer. Woraus ich darauf schließe das das Programm direkt nach Else springt und die ElseIf Punkte nicht bearbeiten kann.
Aber dort kann ich den Fehler nicht finden.
Private Sub ComboBox1_Change()
End Sub
Private Sub ComboBox2_Change()
Me.ComboBox2.Value = Format(Me.ComboBox2.Value, "DD.MM.YYYY")
End Sub
Private Sub ComboBox2_GotFocus()
If (ComboBox1.Value) = "Produkt1" Then
ComboBox2.ListFillRange = "Messwerte!A6:A100"
ElseIf (ComboBox1.Value) = "Produkt2" Then
ComboBox2.ListFillRange = "Messwert!F6:F100"
ElseIf (ComboBox1.Value) = "Produkt3" Then
ComboBox2.ListFillRange = "Messwert!K6:K100"
ElseIf (ComboBox1.Value) = "Produkt4" Then
ComboBox2.ListFillRange = "Messwert!P6:P100"
Else
ComboBox2.ListFillRange = ""
End If
End Sub
Ich hoffe auf eure Hilfe und bedanke mich im vorraus für eure mühe.