Überprüfung der Eingabe
07.03.2004 22:27:24
Burkhard
mit folgendem Code schreibe ich den Inhalt von Text- u. ComboBoxen in eine Tabelle:
Private Sub CommandButton4_Click()
Tabelle1.Select
Z = Range("A1").End(xlDown).Row + 1
If Z > 65000 Then Z = 2
Do While Cells(Z, 1) <> ""
Z = Z + 1
Loop
Cells(Z, 1) = TextBox1
Cells(Z, 2) = TextBox2
Cells(Z, 3) = TextBox3
Cells(Z, 4) = ComboBox1
Cells(Z, 5) = ComboBox2
Cells(Z, 5) = CDbl(ComboBox2)
Cells(Z, 6) = ComboBox3
Cells(Z, 7) = ComboBox4
Cells(Z, 8) = ComboBox5
Cells(Z, 9) = ComboBox6
Cells(Z, 9) = CDbl(CombBox9)
Cells(Z, 10) = ComboBox7
Cells(Z, 10) = CDbl(ComboBox7)
Cells(Z, 11) = ComboBox8
Cells(Z, 11) = CDbl(ComboBox8)
Cells(Z, 12) = ComboBox9
End Sub
Wie kann ich nun per VBA nun überprüfen, ob ich diese Zeile schon geschrieben habe, um doppelte Eingaben zu vermeiden? TextBox3 gilt hier als Kriterium.
Danke schon mal fur Eure Mühe, Gruß Burkhard