Ich versuche Krampfhaft per Textbox Zahlenwerte zu übertragen. Doch sie werden immer als Text erkannt und somit kann ich mit diesen Werten nicht weiterrechnen.
Ich weiss das es ungefähr 1000 Topics zu diesem Thema gibt doch egal wo ich den gefundenen Code hinkopieren. Es will einfach nicht funktionieren.
In Textfeld 4-24 werden Zahlenwerte eingetragen.
Option Explicit
Private Sub CommandButton1_Click()
Dim liZeile As Integer
Dim lcTXTbox As Control, liSpalte As Integer
liZeile = 5
Do Until Sheets("Messwerte").Range("A" & liZeile) = ""
liZeile = liZeile + 1
Loop
liSpalte = 65
For Each lcTXTbox In Controls
If TypeName(lcTXTbox) = "TextBox" Then
If IsNumeric(lcTXTbox) = True And Not IsDate(lcTXTbox) = True Then
Sheets("Messwerte").Range(Chr(liSpalte) & liZeile).Value = Val( _
lcTXTbox)
Else
Sheets("Messwerte").Range(Chr(liSpalte) & liZeile).Value = lcTXTbox
End If
lcTXTbox = ""
liSpalte = liSpalte + 1
End If
Next
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton3_Click()
Unload Me
End Sub
Private Sub TextBox5_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox6_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox7_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox8_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox9_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox10_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox11_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox12_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox13_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox14_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox15_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox16_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox17_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox18_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox19_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox20_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox21_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox22_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox23_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub TextBox24_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 46: KeyAscii = 44
End Select
End Sub
Private Sub UserForm_Click()
End Sub
Vielen Dank im Voraus!
Gruss Dennis