• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

textbox alanına sadece sıfır girilemesin

netvolxxx

Altın Üye
Katılım
29 Ağustos 2023
Mesajlar
225
Excel Vers. ve Dili
2013 Türkçe
merhaba userform textbox alanına kullanıcılar sadece sıfır olarak değer girip kaydetmelerini nasıl engellerim bu textbox alanı miktar olduğu için 0 yazmalarını engellemek istiyorum.

şöyle bir kod kullanıyorum bu işlem de bu seferde örnek 10 yazamıyorum.

Private Sub TextBox5_Change()
If TextBox5 = "" Then Exit Sub
If Mid(TextBox5.Value, Len(TextBox5.Value), 1) = "0" Then
MsgBox "MİKTAR SIFIR GİRİLEMEZ"
TextBox5 = ""
End If
end sub
 
Merhaba,


C++:
Private Sub TextBox5_Change()
    If TextBox5 = "" Then Exit Sub
    If Len(TextBox5.Value) = 1 And TextBox5.Value = 0 Then
        MsgBox "MİKTAR SIFIR GİRİLEMEZ"
        TextBox5 = ""
    End If
End Sub
 
Merhaba,


C++:
Private Sub TextBox5_Change()
    If TextBox5 = "" Then Exit Sub
    If Len(TextBox5.Value) = 1 And TextBox5.Value = 0 Then
        MsgBox "MİKTAR SIFIR GİRİLEMEZ"
        TextBox5 = ""
    End If
End Sub
eyvallah ustad sağolasın teşekkür ederim istediğim buydu....
 
Geri
Üst