• DİKKAT

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

textbox'ta üç karakterden sonra kod çalıştırma

  • Konbuyu başlatan Konbuyu başlatan algil
  • Başlangıç tarihi Başlangıç tarihi
Katılım
28 Nisan 2005
Mesajlar
252
Excel Vers. ve Dili
Excel 2010 Türkçe
Merhaba Arkadaşlar

Bir textbox'ım var ve aşağıdaki kodu çalıştırıyorum.
Kod:
Private Sub TextBox30_Change()
If OptionButton1 = True Then Label27.Caption = OptionButton1.Caption & Format(TextBox30, "000")
If OptionButton2 = True Then Label27.Caption = OptionButton2.Caption & Format(TextBox30, "000")
On Error Resume Next
If [EkipmanList!h5:h65536].Find(Label27.Caption) = False Then
reset
MsgBox Label27.Caption & " nolu kayıt bulunamadı.", vbExclamation, "UYARI"
Exit Sub
End If
For i = 1 To 22
Controls("TextBox" & i) = s1.Cells([Sheet1!h5:h65536].Find(Label27.Caption).Row, i)
Next i
End Sub
Bu kodun Textbox30 a üç karakter girişi yapıldıktan sonra çalışmasını istiyorum. Çok uğraştım ama yapamadım. Bunu yapabilirmiyiz?
 
tam çıkıyordum umarım saçma cevap olmaz ama
direk 2. satırda
if len(textbox30)<3 then exit sub

çalışmazmı.
 
Private Sub TextBox30_Change()
If Len(TextBox30) = 3 Then
MsgBox "alt satırdaki kodları çalıştır"
End If
End Sub
 
Sn. Danersin
Teşekkürler istediğim oldu.
 
Geri
Üst