• DİKKAT

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

Form dan şartlı veri girişi

Katılım
15 Ocak 2013
Mesajlar
85
Excel Vers. ve Dili
2007 türkçe
Merhaba arkadaşlar yardımcı olmanızı isteyeceğim form dan şartlı veri girişi ile ilgili örnek dosyam ekte mevcuttur.
Yardımcı olabilecek arkadaşlara şimdiden teşekkürler
 

Ekli dosyalar

Merhaba,

Eski kodları silip aşağıdaki kodları deneyin.
Kod:
Dim a As Long
Private Sub ComboBox1_Change()
    Call Combo3_Veri_Al
End Sub
Private Sub ComboBox2_Change()
    Call Combo3_Veri_Al
End Sub

Private Sub CommandButton1_Click()

    Dim sut As Integer, sat As Long
   
    sut = WorksheetFunction.Match([AK4], Rows(1), 0)
    sat = a + ComboBox3.ListIndex

    Cells(sat, sut) = TextBox1.Text
   
End Sub

Private Sub UserForm_Initialize()
   
    Dim s As Worksheet, i As Long
   
    Set s = Sheets("Sayfa1")
   
    For i = 2 To s.[B65536].End(3).Row
        ComboBox2.AddItem s.Cells(i, "B").Value
    Next i
   
    For i = 2 To s.[A65536].End(3).Row
        ComboBox1.AddItem s.Cells(i, "A").Value
    Next i
   
    ComboBox1.Text = "Model Seçiniz ..."
    ComboBox2.Text = "Ürün Seçiniz ..."
   
End Sub

Private Sub Combo3_Veri_Al()

    Dim c As Range, Adr As String
   
    ComboBox3.Clear
    a = 0
   
    Set c = [B:B].Find(ComboBox1.Value, , xlValues, xlWhole)
    If Not c Is Nothing Then
        Adr = c.Address
        Do
            If Cells(c.Row, "C") = ComboBox2.Value Then
                If a = 0 Then a = c.Row
                ComboBox3.AddItem Cells(c.Row, "D")
            End If
            Set c = [B:B].FindNext(c)
        Loop While Not c Is Nothing And c.Address <> Adr
    End If
   
End Sub
 
Sayın Ömer hocam
Ellerinize sağlık. Allah razı olsun. Süper oldu. Teşekkür ediyorum.
 
Geri
Üst