AW: Maskeneingabe kenntlich machen
02.12.2006 10:47:04
Achille
Hallo Leute, erstmal danke für eure Hilfe.
Leider ist mir das alles zu kompliziert da ich keine Ahnung vom ganzen habe. mir würde es schon reichen wen bei der Übername der Werte in die Tabelle, die Werte sofort im Kontrollkästchen angezeigt werden, so hätte man die Gewissheit das die Eingabe
übernommen wurde. Vielleicht könnt Ihr mir eine Peispielbefehl anzeigen.
Nochmals Danke
Gruß
Achille
**********************************************************
Option Explicit
Private Sub ComboBox1_Click()
<a href="https://www.herber.de/bbs/user/38683.xls">https://www.herber.de/bbs/user/38683.xls</a>
Dim iSpalte As Integer
If ComboBox1.ListIndex <> 0 Then
TextBox1 = Cells(ComboBox1.ListIndex + 1, 1)
Else
TextBox1 = ""
End If
' vorhandene Inhalte in Textboxen einlesen
For iSpalte = 2 To 13
Controls("Textbox" & iSpalte) = Cells(ComboBox1.ListIndex + 2, iSpalte)
Next iSpalte
End Sub
Private Sub CommandButton1_Click()
If ComboBox1.ListIndex > 0 Then
Rows(ComboBox1.ListIndex + 1).Delete
TextBox1 = ""
UserForm_Initialize
End If
End Sub
Private Sub CommandButton2_Click()
Dim xZeile As Long
If TextBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = 0 Then
xZeile = [A65536].End(xlUp).Row + 1
Else
xZeile = ComboBox1.ListIndex + 1
End If
TextBox1 = ""
On Error Resume Next
Cells(xZeile, 2) = CDate(TextBox2) ' value
Cells(xZeile, 3) = CDate(TextBox3) ' value
Cells(xZeile, 4) = CDate(TextBox4) ' value
Cells(xZeile, 5) = CDate(TextBox5) ' value
Cells(xZeile, 6) = CDate(TextBox6) ' value
Cells(xZeile, 7) = CDate(TextBox7) ' value
Cells(xZeile, 8) = CDate(TextBox8) ' value
Cells(xZeile, 9) = CDate(TextBox9) ' value
Cells(xZeile, 10) = CDate(TextBox10) ' value
Cells(xZeile, 11) = CDate(TextBox11) ' value
Cells(xZeile, 12) = CDate(TextBox12) ' value
Cells(xZeile, 13) = CDate(TextBox13) ' value
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
End Sub
Private Sub CommandButton3_Click()
Unload Me
End Sub
Private Sub CommandButton4_Click()
If TextBox1 = "" Then ThisWorkbook.Save
End Sub
Private Sub UserForm_Initialize()
Dim aRow, i As Long
Application.EnableEvents = False
ComboBox1.Clear
aRow = [A65536].End(xlUp).Row
ComboBox1.AddItem "neue Person hinzufügen"
For i = 2 To aRow
ComboBox1.AddItem Cells(i, 1) & ", " & Cells(i, 2)
Next i
ComboBox1.ListIndex = 0
Application.EnableEvents = True
End Sub