• DİKKAT

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

Textbox veri aktarımında Problem

Katılım
5 Mart 2012
Mesajlar
14
Excel Vers. ve Dili
2003+2010
Arkadaşlar Merhaba,

Aşağıdaki kodlarla Userform'a excel den verileri aldırıyorum ama şöyle bi sorun varki EMEKLI Sayfamdan Sadece 353 Satıra Kadar alıyor RAPOR sayfamdan Tam alıyor Bu problemi çözemedim...

Kod:
Private Sub ComboBox1_Change()
Dim wsRapor As Worksheet, wsEmeklı As Worksheet
Dim satRapor As Long, satEmeklı As Long
Set wsRapor = Worksheets("RAPOR")
Set wsEmeklı = Worksheets("EMEKLI")
On Error Resume Next
satRapor = Application.Match(ComboBox1.Value, wsRapor.Columns("B"), 0)
If Err.Number = 0 Then
    TextBox1.Value = wsRapor.Cells(satRapor, "D").Value
    TextBox2.Value = wsRapor.Cells(satRapor, "E").Value
    TextBox3.Value = wsRapor.Cells(satRapor, "F").Value
    TextBox4.Value = wsRapor.Cells(satRapor, "G").Value
    TextBox5.Value = Format(wsRapor.Cells(satRapor, "AB").Value, "dd.mm.yyyy")
    TextBox6.Value = Format(wsRapor.Cells(satRapor, "H").Value, "dd.mm.yyyy")
    TextBox7.Value = Format(wsRapor.Cells(satRapor, "I").Value, "dd.mm.yyyy")
    TextBox8.Value = Format(wsRapor.Cells(satRapor, "BZ").Value, "dd.mm.yyyy")
    TextBox9.Value = Format(wsRapor.Cells(satRapor, "J").Value, "dd.mm.yyyy")
    TextBox10.Value = wsRapor.Cells(satRapor, "CA").Value
    TextBox11.Value = wsRapor.Cells(satRapor, "CB").Value
    TextBox12.Value = wsRapor.Cells(satRapor, "CC").Value
    TextBox13.Value = Format(wsRapor.Cells(satRapor, "CD").Value, "dd.mm.yyyy")
    If TextBox13.Value <> "" Then TextBox14.Value = ""
    If TextBox13.Value = "" Then TextBox14.Value = "Dolmadı"
    TextBox15.Value = Format(wsRapor.Cells(satRapor, "CE").Value, "##.##0")
    TextBox16.Value = Format((TextBox15.Value) * (",0066"), "#,##0.00")
    TextBox17.Value = Format((TextBox15.Value) - (TextBox16.Value), "#,##0.00")
End If
satEmeklı = Application.Match(ComboBox1.Value, wsEmeklı.Columns("B"), 0)
If Err.Number = 0 Then
    TextBox18.Value = Format(wsEmeklı.Cells(satEmeklı, "O").Value, "@") '
    TextBox36.Value = Format(wsEmeklı.Cells(satEmeklı, "P").Value, "@")
    TextBox37.Value = Format(wsEmeklı.Cells(satEmeklı, "Q").Value, "@")
    TextBox19.Value = Format(wsEmeklı.Cells(satEmeklı, "U").Value, "@")
    TextBox38.Value = Format(wsEmeklı.Cells(satEmeklı, "V").Value, "@")
    TextBox39.Value = Format(wsEmeklı.Cells(satEmeklı, "W").Value, "@")
    TextBox20.Value = Format(wsEmeklı.Cells(satEmeklı, "L").Value, "@")
    TextBox25.Value = Format(wsEmeklı.Cells(satEmeklı, "X").Value, "@")
    TextBox28.Value = Format(wsEmeklı.Cells(satEmeklı, "AB").Value, "@")
    TextBox40.Value = Format(wsEmeklı.Cells(satEmeklı, "AC").Value, "@")
    TextBox41.Value = Format(wsEmeklı.Cells(satEmeklı, "AD").Value, "@")
    TextBox26.Value = Format(wsEmeklı.Cells(satEmeklı, "Z").Value, "@")
    TextBox33.Value = Format(wsEmeklı.Cells(satEmeklı, "AE").Value, "@")
    TextBox42.Value = Format(wsEmeklı.Cells(satEmeklı, "AF").Value, "@")
    TextBox43.Value = Format(wsEmeklı.Cells(satEmeklı, "AG").Value, "@")
    TextBox27.Value = Format(wsEmeklı.Cells(satEmeklı, "Y").Value, "@")
    TextBox34.Value = Format(wsEmeklı.Cells(satEmeklı, "AA").Value, "@")
    TextBox44.Value = Format(wsEmeklı.Cells(satEmeklı, "AT").Value, "dd.mm.yyyy")
    TextBox45.Value = Format(wsEmeklı.Cells(satEmeklı, "AU").Value, "@")
End If
On Error GoTo 0
End Sub

Private Sub UserForm_Initialize()
ComboBox1.RowSource = "RAPOR!B4:B" & Sheets("RAPOR").Range("B65536").End(3).Row
ComboBox1.RowSource = "EMEKLI!B4:B" & Sheets("EMEKLI").Range("B65536").End(3).Row
End Sub
 
Merhaba,

Sorunuzu küçük bir örnek dosya ile desteklermisiniz.
 
Geri
Üst