- 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
