das geht bestimmt, aber ich weiß einfach nicht wie. Folgender Teil eines UserForm-Listing kann doch bestimmt abgekürzt werdern mit einer For Each..In "Gruppe"-Bedingung. Nun weiß ich aber nicht, wie ich die "Gruppe" definieren kann. Oder ist ein anderer Weg sinnvoll? (Dargestellt sind drei von 20(!) solcher Anweisungen und das würde doch viel zu unübersichtlich im Code)
If .TextBoxVorkosten.Text = "" Then
MsgBox "Fehlende Eingabe! " & CStr(.LabelVorkosten.Caption) & "!", , "Achtung!"
.TextBoxVorkosten.SetFocus
Exit Sub
End If
If .TextBoxBrutto.Text = "" Then
MsgBox "Fehlende Eingabe! " & CStr(.LabelBrutto.Caption) & "!", , "Achtung!"
.TextBoxBrutto.SetFocus
Exit Sub
End If
If .TextBoxBrutto.Text = "" Then
MsgBox "Fehlende Eingabe! " & CStr(.LabelBrutto.Caption) & "!", , "Achtung!"
.TextBoxBrutto.SetFocus
Exit Sub
End If