Ich habe eine UF,wo mit den TextBoxen Werte eingetragen werden.
Nun möchte ich statt Werte eintragen,das Werte gelöscht werden.
Zb. in Textbox TextBoxE gebe ich eine 4 ein. nun wird in Sheets "Einbringt." eine 4 eingetragen.
Nun möchte ich aber die 4 löschen.
Könnte mir dazu bitte jemand helfen ?
Danke
Heinz
'Eintragen
Private Sub CommandButton1_Click()
Dim i As Integer
Dim Zeile As Integer
Application.ScreenUpdating = False
If TextBoxE "" Then
Zeile = UserForm_Stunden.TextBoxHidden.Value
For i = 27 To 256
If ThisWorkbook.Worksheets("TextBoxE").Cells(Zeile, i).Text = "" Then
Sheets("Einbringt.").Unprotect Password:="vetro"
ThisWorkbook.Worksheets("Einbringt.").Cells(Zeile, i) = TextBoxE.Value
Exit For
End If
Next i
End If
Sheets("Einbringt.").Protect Password:="vetro"
UserForm_Stunden.Hide
If TextBoxÜ "" Then
Zeile = UserForm_Stunden.TextBoxHidden1.Value
For i = 183 To 256
If ThisWorkbook.Worksheets("Üst").Cells(Zeile, i).Text = "" Then
Sheets("Üst").Unprotect Password:="vetro"
ThisWorkbook.Worksheets("Üst").Cells(Zeile, i) = TextBoxÜ.Value
Exit For
End If
Next i
End If
Sheets("Üst").Protect Password:="vetro"
TextBoxÜ = ""
TextBoxE = ""
UserForm_Stunden.Hide
Application.ScreenUpdating = True
End Sub
'Eintragen
Private Sub TextBoxE_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim Regex As Object
Set Regex = CreateObject("vbScript.Regexp")
With Regex
.Pattern = "(^\d+\.\d+$|^\d+\.$|^\d+$)"
If .test(TextBoxE.Text & Chr(KeyAscii)) = False Then KeyAscii = 0
End With
TextBoxE = ""
End Sub
'Eintragen
Private Sub TextBoxÜ_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim Regex As Object
Set Regex = CreateObject("vbScript.Regexp")
With Regex
.Pattern = "(^\d+\.\d+$|^\d+\.$|^\d+$)"
If .test(TextBoxÜ.Text & Chr(KeyAscii)) = False Then KeyAscii = 0
End With
TextBoxÜ = ""
End Sub