Merhabalar
Aşağıdaki gibi bir kodum var textbox a tarih girildiğinde len değerine göre araya nokta koyuyor.Fakat backspace veya delete tuşu ile girdiğim veriyi silemiyorum.Nerede hata var göremedim.Yardımcı olursanız sevinirim
Saygılarımla
Private Sub TextBox1_Change()
If TextBox1.Tag = "1" = True Then Exit Sub
If Len(TextBox1) = 2 Then
If InStr(TextBox1, ".") = 0 Then TextBox1 = TextBox1 & "."
ElseIf Len(TextBox1) = 5 Then
If Len(TextBox1) - Len(Application.Substitute(TextBox1, ".", "")) < 2 Then
TextBox1 = TextBox1 & "."
End If
End If
End Sub
Aşağıdaki gibi bir kodum var textbox a tarih girildiğinde len değerine göre araya nokta koyuyor.Fakat backspace veya delete tuşu ile girdiğim veriyi silemiyorum.Nerede hata var göremedim.Yardımcı olursanız sevinirim
Saygılarımla
Private Sub TextBox1_Change()
If TextBox1.Tag = "1" = True Then Exit Sub
If Len(TextBox1) = 2 Then
If InStr(TextBox1, ".") = 0 Then TextBox1 = TextBox1 & "."
ElseIf Len(TextBox1) = 5 Then
If Len(TextBox1) - Len(Application.Substitute(TextBox1, ".", "")) < 2 Then
TextBox1 = TextBox1 & "."
End If
End If
End Sub
