• DİKKAT

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

combobox değiştir

bydogannn67

Altın Üye
Katılım
6 Ocak 2016
Mesajlar
226
Excel Vers. ve Dili
2010 türkçe
Merhabalar

aşağıdaki kod ile sayfa üzerinde eklediğim verilerde değiştirmek istediğimde textboxlarda sıkıntı yok ama 1 tane combobox'um var değiştir dediğimde ilgili satırı değilde komple bütün satırı değiştiriyo nerde yanlış yapmış olabilirim

Kod:
ThisWorkbook.Activate
Sheets("LİSTE").Select
Dim sat As Integer
'*****listbox seçili değilse uyar
If ListBox1.ListIndex < 0 Then
MsgBox "Önce bir isim seçmelisiniz", vbInformation
Exit Sub
End If
KAYITYAP.Show
a = Cells(ListBox1.ListIndex + 2, 2)
If a <> TextBox1 Then
Sheets(a).Name = TextBox1
End If
'*****değişecek verileri döngü ile kontrol et
For sat = 2 To Cells(65536, "b").End(xlUp).Row
If Cells(sat, "B") Like ListBox1.Column(1) Then
Sheets("LİSTE").Cells(sat, "b") = TextBox1
End If
Next
For sat = 2 To Cells(65536, "c").End(xlUp).Row
If Cells(sat, "c") Like ListBox1.Column(2) Then
Sheets("LİSTE").Cells(sat, "c") = TextBox2
End If: Next
For sat = 2 To Cells(65536, "E").End(xlUp).Row
If Cells(sat, "E") Like ListBox1.Column(3) Then
Sheets("LİSTE").Cells(sat, "E") = TextBox3
End If: Next
For sat = 2 To Cells(65536, "F").End(xlUp).Row
If Cells(sat, "F") Like ListBox1.Column(4) Then
Sheets("LİSTE").Cells(sat, "F") = TextBox4
End If: Next
For sat = 2 To Cells(65536, "G").End(xlUp).Row
If Cells(sat, "G") Like ListBox1.Column(5) Then
Sheets("LİSTE").Cells(sat, "G") = TextBox5
End If: Next
For sat = 2 To Cells(65536, "H").End(xlUp).Row
If Cells(sat, "H") Like ListBox1.Column(6) Then
Sheets("LİSTE").Cells(sat, "H") = TextBox6
End If: Next
For sat = 2 To Cells(65536, "d").End(xlUp).Row
If Cells(sat, "d") Like ListBox1.Column(7) Then
Sheets("LİSTE").Cells(sat, "d") = ComboBox2
End If: Next
'''''LİSTE SAYFASINDA İSİMLERİ SIRALAR

Range("B2:N500").Select
    ActiveWorkbook.Worksheets("LİSTE").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("LİSTE").Sort.SortFields.Add Key:=Range("B2:B500") _
        , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("LİSTE").Sort
        .SetRange Range("B2:N500")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
        Range("A1").Select
    End With
'değişim sonu textleri temizle
TextBox1 = Empty
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
TextBox5 = Empty
TextBox6 = Empty
ComboBox2 = Empty
'... SAYFALARI ALFABETİK SIRALA

Call Module1.ssira
'***** listboxu yenile
say = WorksheetFunction.CountA(Range("A2:A65500"))
    For i = 1 To say
        Cells(i + 1, 1) = i
    Next i
MsgBox "DEĞİŞTİRME İŞLEMİ YAPILMIŞTIR.", vbInformation
TextBox7 = ".": TextBox7 = ""
Sheets("GİRİŞ").Select
End Sub
 
Dosyanızı eklerseniz orada daha net görülecektir sanırım, ve daha hızlı yardım alabilirsiniz.:cool:
 
Dosya ekte hocam yardımcı olabilirseniz sevinirim
 

Ekli dosyalar

Dosyanız ektedir.:cool:
 

Ekli dosyalar

çok sağolun hocam eksik taraflarıda düzeltmişiniz emeğinize sağlık :)
 
Hocam işe girişle birlikte işten çıkış kutusuda ektedim çıkış kutusunu boş bırakınca tarih formatından dolayı hata verıyo nasıl bı düzeltme yapabılırız
 
Hocam işe girişle birlikte işten çıkış kutusuda ektedim çıkış kutusunu boş bırakınca tarih formatından dolayı hata verıyo nasıl bı düzeltme yapabılırız

İlgili kodu yazarmısınız?
 
=CDATE(TEXTBOX3) kodlu ilgili alani boş bırakıp değiştir dediğimizde hata veriyo hocam
 
telefondan yazdığım için satırı tam yazamamıştm hocam kusura bakmayın

ilgili satır;
Sheets("LİSTE").Cells(k.Row, "c") = CDate(TextBox3)

formda bu alan boş işe değiştir dediğimde hata veriyo
 
Buyurun.:cool:
Kod:
If IsDate(TextBox3.Value) Then
    Sheets("LİSTE").Cells(k.Row, "c") = CDate(TextBox3.Value)
End If
 
Geri
Üst