ich speichere eine Eingabemaske (Texte) in Zellen.
Dabei verwende ich folgenden Code:
Sub DatenEintragen()
Dim lngNext As Long
Dim objCB As Object
Dim strTmp As String
lngNext = Application.max(3, Cells(Rows.Count, 1).End(xlUp).Row + 1)
Cells(lngNext, 1) = TextBox7.text
Cells(lngNext, 2) = "Datum: " & TextBox1.text & vbCrLf & _
"Zeit: " & TextBox2.text & vbCrLf & _
"Ort: " & TextBox3.text & vbCrLf & _
"Experimentator: " & TextBox4.text & vbCrLf & _
"Anwesende: " & TextBox5.text & vbCrLf & _
"Frequenz: " & TextBox6.text & vbCrLf & _
"Scan-Steprate: " & TextBox9.text & vbCrLf & _
"Band: " & TextBox8.text
Cells(lngNext, 4) = TextBox10.text
For Each objCB In Me.OLEObjects
If objCB.progID = "Forms.CheckBox.1" Then
If objCB.Object.Value Then
strTmp = strTmp & objCB.Object.Caption & vbCrLf
objCB.Object.Value = False
End If
ElseIf objCB.progID = "Forms.TextBox.1" Then
objCB.Object.Value = ""
End If
Next
If Len(strTmp) Then Cells(lngNext, 3) = Left(strTmp, Len(strTmp) - 1)
Cells(lngNext, 4) = Cells(2, 4).text
Cells(2, 4) = ""
Rows(lngNext).AutoFit
End Sub
Frage:der Text aus "TextBox10.txt" wird nicht in die Zelle geschrieben wie z.B. bei "TextBox7.txt" obwohl ich den selben Code verwende:
Cells(lngNext, 4) = TextBox10.text
Was mache ich falsch!? Vielen Dank für Hilfe!
Danke & Gruss,
Juergen