Eingabefälder Erweitern
19.11.2006 17:19:07
Achille
bräuchte wieder mal Hilfe, bin leider nicht einmal Anfänger.
Ich versuche eine Eingabemaske mit mehr Text-eingabefelder zu versehen, was ich nicht verstehe ist sobald ich die Formeln eingebe
Cells(xZeile, 5).Value = CDate(TextBox5.Text
TextBox1 = "" , become ich ein Debuggen Fehler.
Was mache ich bitte falsch?
Helft mir bitte noch dieses mal.
Habe zusätzlich den Excel File beigefügt.
********************************************************
Option Explicit
Private Sub ComboBox1_Click()
If ComboBox1.ListIndex <> 0 Then
TextBox1 = Cells(ComboBox1.ListIndex + 1, 1)
Else
TextBox1 = ""
End If
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
Cells(xZeile, 1).Value = CDate(TextBox1.Text)
Cells(xZeile, 2).Value = CDate(TextBox2.Text)
Cells(xZeile, 3).Value = CDate(TextBox3.Text)
Cells(xZeile, 4).Value = CDate(TextBox4.Text)
Cells(xZeile, 5).Value = CDate(TextBox5.Text)
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
End Sub
Private Sub CommandButton3_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim aRow, q As Long
Application.EnableEvents = False
ComboBox1.Clear
aRow = [A65536].End(xlUp).Row
ComboBox1.AddItem ""
For q = 2 To aRow
ComboBox1.AddItem Cells(q, 1) & ", " & Cells(q, 2)
Next q
ComboBox1.ListIndex = 0
Application.EnableEvents = True
End Sub