ikinci textboxta sayfa değişikliği

Katılım
11 Ağustos 2005
Mesajlar
239
arkadaşlar aşağıdaki kodda Textbox22 çalışmıyor bir bakarsanız sevinirim
Textbox21 den farkı sayfa1 den bilgiyi alacak

Selamlar

Private Sub TextBox1_Change()
Set S1 = Sheets("sayfa1")
With ListBox1
.ColumnCount = 1
.ColumnWidths = "65;"
End With
ListBox1.Clear
For suz = 2 To WorksheetFunction.CountA([sayfa1!b1:b65536])
alan = UCase(Replace(Replace(Sayfa1.Range("b" & suz), "j", "J"), "k", "K"))
veri = UCase(Replace(Replace(TextBox1, "j", "J"), "k", "K"))
If alan Like "*" & veri & "*" Then
If WorksheetFunction.CountIf(S1.Range("b2:b" & suz), S1.Cells(suz, "b")) > 1 Then GoTo 10
ListBox1.AddItem
ListBox1.list(s, 0) = Sayfa1.Range("B" & suz)
s = s + 1
End If
10 Next
If WorksheetFunction.CountIf([liste!b:b], TextBox1) > 0 Then
sat = [liste!b1:b65536].Find(TextBox1).Row
TextBox21 = Format(Sheets("liste").Cells(sat, "d"), "#,##0")
TextBox6 = Sheets("liste").Cells(sat, "e")
End If
10 Next
If WorksheetFunction.CountIf([sayfa1!b:b], TextBox1) > 0 Then
m = [sayfa1!b1:b65536].Find(TextBox1).Row
TextBox22 = Format(Sheets("sayfa1").Cells(m, "d"), "#,##0")
End If
ComboBox1_Change
ComboBox2_Change
ComboBox3_Change
ComboBox4_Change
For b = 5 To 18
deger = Controls("combobox" & b)
Controls("combobox" & b) = ""
Controls("combobox" & b) = deger
Next
End Sub
 

Mahmut Kök

Özel Üye
Katılım
14 Temmuz 2006
Mesajlar
878
Excel Vers. ve Dili
Excel 2007 - Türkçe
Kodlarda sorun yok gibi. Dosyanızı ekleyebilirseniz daha iyi olur.
 
Katılım
11 Ağustos 2005
Mesajlar
239
hocam userforma firma risk bölümü limit boşluğu isimli textbox 22 ye firmanın textbox21 deki tutardan sayfa1 deki tutarları toplanıp çıkarılacak
 

Mahmut Kök

Özel Üye
Katılım
14 Temmuz 2006
Mesajlar
878
Excel Vers. ve Dili
Excel 2007 - Türkçe
Birinci dosyada, Açık belgeye (Kendisine) DAO ile bağlanıp hızlı bir şekilde Safa1'den toplamları alıyor ve textbox21'den çıkarıyor. (Dosyayı bilgisayarınıza kaydetmeniz gerekir.)

İkinci dosyada, toplamları klasik döngü ile alıyor.

Umarım işinizi görür.
 
Katılım
11 Ağustos 2005
Mesajlar
239
hocam ellerine sağlık
ben ikinciyi kullanıcam
hocam textbox 23,24,25,26 yı yüzlük ayraçlı yapamadım
 

Mahmut Kök

Özel Üye
Katılım
14 Temmuz 2006
Mesajlar
878
Excel Vers. ve Dili
Excel 2007 - Türkçe
hocam o kodu denedim olmadı veya yanlış yeremi yezdım

Kod:
Private Sub [B]ComboBox1_Change[/B]()
Set S1 = Sheets("sayfa1")
ListBox2.Clear
For a = 2 To S1.[b65536].End(3).Row
If S1.Cells(a, "b") = TextBox1 And S1.Cells(a, "c") = ComboBox1 Then
ListBox2.AddItem
ListBox2.list(c, 0) = S1.Cells(a, "d")
deg = deg + S1.Cells(a, "d")
ListBox2.list(c, 1) = Format(S1.Cells(a, "f"), "dd.mm.yyyy")
c = c + 1
End If
Next
[COLOR=red][B]TextBox23 = Format(deg, "#,##0.00")[/B][/COLOR]
End Sub
 
Üst