Combobox ta Düsey arama

Kemal Demir

Özel Üye
Katılım
29 Temmuz 2004
Mesajlar
2,108
Arkadaslar Actığım başlık için Üzgünüm Bir kaç ornek gördüm ama tam anlayamadım
ezberlemekte ıstemıyorum
O yuzden başlık Açtım.


Arkadaslar Bir Siparis ile ilgili combobxlarda seçilen ürüne karsılık ilgili fiat bilgileri textbox a gitsin ve bunu ilgili sayfaya aktarmak istiyorum

Yalnız Form üzerinden Birden fazla Ürün Siparişi Yapılma durumunda Tıkandım.

Umarım Aktarabilmişimdir.

Dosya Yolluyorum
 

Kemal Demir

Özel Üye
Katılım
29 Temmuz 2004
Mesajlar
2,108
Sn. Mahmut bey

Hocam Yapamadım ve zannedersem ornek biraz değişik ben tek kosullu olmasını ıstıyorum mesela üzüm için tek fiat karpuz için tek fiat ..


Arkadaslar tıkandım :agla: :agla: :agla: :agla: :agla:
:yardim: :yardim:
 

agd

Katılım
19 Ağustos 2005
Mesajlar
31
Excel Vers. ve Dili
OfficeXP/TR
merhaba,
dosyanızdaki bir ürün için bir çalışma yapmaya çalıştım.amatörce.

umarım yararlı olur.

sevgiler
 
Katılım
22 Nisan 2005
Mesajlar
486
Excel Vers. ve Dili
tarkan@tarkanvural.com.tr
Selam;

Kod:
Option Explicit
Static bul As Range, i, x, z As Integer
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "veri!a2:a9"
ComboBox2.RowSource = "veri!a2:a9"
ComboBox3.RowSource = "veri!a2:a9"
ListBox1.ColumnCount = 4
ListBox1.RowSource = "siparis!a2:d10"
ListBox1.ColumnHeads = True
ListBox1.Font.Bold = True
End Sub
Private Sub ComboBox1_Change()
    For Each bul In Worksheets("veri").Range("a:a")
        If bul.Value = ComboBox1.Value Then
            TextBox1.Value = bul(1, 2).Value
        End If
    Next
    If TextBox2.Value = Empty Then
            TextBox3.Value = 0
        Else
            TextBox3.Value = Val(TextBox1.Value) * Val(TextBox2.Value)
        End If
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox2.Value = Empty Then
            TextBox3.Value = 0
        Else
            TextBox3.Value = Val(TextBox1.Value) * Val(TextBox2.Value)
        End If
End Sub
Private Sub ComboBox2_Change()
    For Each bul In Worksheets("veri").Range("a:a")
        If bul.Value = ComboBox2.Value Then
            TextBox4.Value = bul(1, 2).Value
        End If
    Next
    If TextBox5.Value = Empty Then
            TextBox6.Value = 0
        Else
            TextBox6.Value = Val(TextBox4.Value) * Val(TextBox5.Value)
        End If
End Sub
Private Sub TextBox5_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox5.Value = Empty Then
            TextBox6.Value = 0
        Else
            TextBox6.Value = Val(TextBox4.Value) * Val(TextBox5.Value)
        End If
End Sub
Private Sub ComboBox3_Change()
    For Each bul In Worksheets("veri").Range("a:a")
        If bul.Value = ComboBox3.Value Then
            TextBox7.Value = bul(1, 2).Value
        End If
    Next
    If TextBox8.Value = Empty Then
            TextBox9.Value = 0
        Else
            TextBox9.Value = Val(TextBox7.Value) * Val(TextBox8.Value)
        End If
End Sub
Private Sub TextBox8_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox8.Value = Empty Then
            TextBox9.Value = 0
        Else
            TextBox9.Value = Val(TextBox7.Value) * Val(TextBox8.Value)
        End If
End Sub
Private Sub CommandButton1_Click()
Sheets("siparis").Cells(2, 1).Value = ComboBox1.Value
Sheets("siparis").Cells(3, 1).Value = ComboBox2.Value
Sheets("siparis").Cells(4, 1).Value = ComboBox3.Value

Sheets("siparis").Cells(2, 2).Value = TextBox1.Value
Sheets("siparis").Cells(3, 2).Value = TextBox4.Value
Sheets("siparis").Cells(4, 2).Value = TextBox7.Value

Sheets("siparis").Cells(2, 3).Value = TextBox2.Value
Sheets("siparis").Cells(3, 3).Value = TextBox5.Value
Sheets("siparis").Cells(4, 3).Value = TextBox8.Value

Sheets("siparis").Cells(2, 4).Value = TextBox3.Value
Sheets("siparis").Cells(3, 4).Value = TextBox6.Value
Sheets("siparis").Cells(4, 4).Value = TextBox9.Value
End Sub
Kolay gelsin.
 

agd

Katılım
19 Ağustos 2005
Mesajlar
31
Excel Vers. ve Dili
OfficeXP/TR
sayın tarkan vural,

Static bul As Range, i, x, z As Integer satırı

compile error:
ınvalid outside procedure atası veriyor...

ne yapmamız gerekiyor...
iyi akşamlar..
 
Katılım
22 Nisan 2005
Mesajlar
486
Excel Vers. ve Dili
tarkan@tarkanvural.com.tr
i, x, z As Integerı fazladan yazmışım :D
 
Üst