• DİKKAT

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

Textbox'a girilen değer X'den büyükse

vardar07

Destek Ekibi
Destek Ekibi
Katılım
19 Mart 2008
Mesajlar
2,154
Excel Vers. ve Dili
Office 2007 Enterprise
Türkçe
Merhabalar.Arkadaşlar textbox1'e 1 ila 50 arasında değer girilince textbox2'ye geçmesi için aşağıdaki kodu deniyorum ancak textbox1'i boşaltıp textbox2'ye geçmekte .Hatam nerede.


Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
 If TextBox1 <> 0 Then
  If TextBox1.Value <= 49 And TextBox1.MaxLength = 2 Then
  TextBox2.SetFocus
   Else
    TextBox1 = ""
    TextBox1.SetFocus
End If
End If
End Sub
 
Aşağıdaki kodu deneyiniz.

Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Cancel = True
    If TextBox1 >= 1 And TextBox1 <= 50 Then
        Cancel = False
    End If
End Sub
 
Aşağıdaki kodu deneyiniz.

Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Cancel = True
    If TextBox1 >= 1 And TextBox1 <= 50 Then
        Cancel = False
    End If
End Sub

Korhan bey çok teşekkürler.
 
Geri
Üst