• DİKKAT

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

İki TextBoxtaki şartı sağlıyorsa verileri bulsun...

  • Konbuyu başlatan Konbuyu başlatan manly
  • Başlangıç tarihi Başlangıç tarihi
Katılım
25 Nisan 2005
Mesajlar
690
Excel Vers. ve Dili
Excel 2003 Türkçe
Ek'te gönderdiğim dosyayı açtığınızda FORM butonuna tıkladığınızda açılan userform üzerindeki renkli textboxlara Stok No ve Kod girdiğimizde iki veri şartını sağlıyorsa o satırdaki verileri diğer textboxlara gelmesini istiyorum.
 

Ekli dosyalar

stok 124
kod 1000 girince stok 123 buluyor

stok 126
kod 1500 girince stok 125 buluyor
 
Deneyiniz.
Kod:
Private Sub CommandButton2_Click()
Dim BUL As Range, X As Byte
    If TextBox01 = "" Then Exit Sub
        With Sheets("Yeni")
    son = .Cells(Rows.Count, 1).End(3).Row
    For Each BUL In .Range("B2:B" & son)
    a = BUL.Row
    .Cells(a, 1).Select
    b = .Cells(a, 1)
    c = .Cells(a, 2)
    If b = TextBox01.Value * 1 And c = TextBox02.Value * 1 Then
        TextBox1.Value = .Cells(BUL.Row, 1)
        TextBox2.Value = .Cells(BUL.Row, 2)
        TextBox3.Value = .Cells(BUL.Row, 3)
        TextBox4.Value = .Cells(BUL.Row, 4)
        TextBox5.Value = .Cells(BUL.Row, 5)
        TextBox6.Value = .Cells(BUL.Row, 6)
        TextBox7.Value = .Cells(BUL.Row, 7)
        TextBox8.Value = .Cells(BUL.Row, 8)
        TextBox9.Value = .Cells(BUL.Row, 9)
        MsgBox "İstediğiniz Kaydı Buldum.", , "Sezer ÇAY"
   End If
   Next
   If TextBox1 = "" Then
        For X = 1 To 9
            Me.Controls("TextBox" & X) = ""
        Next
         TextBox01.SetFocus
        MsgBox "Kayıt bulunamadı !", vbCritical
    End If
    End With
End Sub
 
Teşekkürler hocam. Ellerinize sağlık
 
Hocam bu dosyada hata verdi. Kod Sayfasında bul komutunda. Sorun nerede acaba...
 

Ekli dosyalar

Son düzenleme:
.Cells(a, 1).Select satırını silip denermisiniz..
 
Rica ederim.
 
Geri
Üst