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
şö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
