Ich habe eine ListBox, bei der Multiselect möglich ist. Bevor man aber die Informationen des UserForms per Mail abschicken kann, möchte ich kontrollieren, ob auch alle Felder ausgefüllt wurden.
Das heisst ich habe in meiner Makro folgenden Code:
'Angaben kontrollieren
If CB_ServerType.Value = "" Or TB_ServerName.Text = "" Then
MsgBox ("Please fill out all fields!"), vbOKOnly, "Error"
Exit Sub
End If
If CHB_Option1.Value = False And CHB_Option2.Value = False And CHB_Option3.Value = False _
And CHB_Option4.Value = False And CHB_Option5.Value = False And CHB_Option6.Value = False _
And CHB_Option7.Value = False And CHB_Option8.Value = False Then
MsgBox ("Please select at minimum one option!"), vbOKOnly, "Error"
Exit Sub
End If
If OB_Yes.Value = False And OB_No.Value = False Then
MsgBox ("Please select 'Yes' or 'No'!"), vbOKOnly, "Error"
Exit Sub
End If
Mir fehlt aber nun noch das Kontrollieren der ListBox mit Mehrfachauswahl! Was ist der normale "Befehl" oder "Ausdruck" für eine ListBox mit Multiselect, bei der nichts angewählt ist?Habe es schon mit LB_ServiceLevel.ListIndex=-1 versucht, das geht aber nicht... Ach ja, meine ListBox heisst LB_ServiceLevel!
Danke für eure Hilfe
Liebe Grüsse
Ximena