ComboBox_FirmaUnvani.RemoveItem (Me.ComboBox_FirmaUnvani.ListIndex) '<== combodan değer silme
Private Sub btn_KayitSil_Click()
If Len(TextBox_ID & "") = 0 Then Exit Sub
If MsgBox("Veriler Silinecek, Emin misiniz...?", vbExclamation + vbYesNo, "Firma Tanımlama Formu") = vbNo Then Exit Sub
With ThisWorkbook.Worksheets("Ana_Sayfa")
KytSil (TextBox_ID)
ComboBox_FirmaUnvani.RemoveItem (Me.ComboBox_FirmaUnvani.ListIndex) '<== combodan değer silme
Call temizle
TextBox_Tarih = Format(Date, "dd.mm.yyyy")
End With
TextBox_Tarih.SetFocus
With TextBox_Tarih
.SelStart = 0
.SelLength = .TextLength
End With
btn_KayitEkle.Enabled = True
End Sub
Modüle eklenen kayıt silme koduSub KytSil(ByVal IDBul As String)
Dim tbl As ListObject
Dim Sonuc As Range
With ThisWorkbook.Worksheets("ana_sayfa")
Set tbl = .ListObjects("Tablo1")
'1. sütunda veri arama
On Error Resume Next
Set Sonuc = tbl.DataBodyRange.Columns(1).Find(IDBul, LookAt:=xlWhole)
On Error GoTo 0
'bulunan verini silinmesi
.Unprotect "171717"
If Not Sonuc Is Nothing Then
xTblBul = tbl.ListRows(Sonuc.row - tbl.HeaderRowRange.row).Index
tbl.ListRows(xTblBul).Delete
End If
.Protect "171717"
End With
End Sub