- Katılım
- 31 Aralık 2007
- Mesajlar
- 227
- Excel Vers. ve Dili
- Office 2007 Türkçe
Kod:
Private Sub CommandButton3_Click()
If ListBox1 = Empty Then
MsgBox "Veri kaydı bulunamamıştır.", vbExclamation, "Dikkat !"
Exit Sub
End If
If ListBox1.ListIndex < 0 Then
MsgBox "Lütfen listeden veri seçimi yapınız.", vbExclamation, "Dikkat !"
Exit Sub
End If
If MsgBox("Seçtiğiniz kayıt silinecektir onaylıyor musunuz ?", vbCritical + vbYesNo, "Dikkat !") = vbYes Then
ListBox1.RowSource = Empty
Range("A" & ActiveCell.Row, "C" & ActiveCell.Row).ClearContents
Range("A2:J65536").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Range("A2") = 1
Range("A2").AutoFill Destination:=Range("A2:A" & Range("B65536").End(3).Row), Type:=xlFillSeries
With ÖĞRENCİLER.ListBox1
.BackColor = vbYellow
.ColumnCount = 3
.ColumnWidths = "50;75;75"
.ForeColor = vbRed
If Sheets("ÖĞRENCİLER").Range("A2") = Empty Then
.RowSource = Empty
Else
.RowSource = "ÖĞRENCİLER!a2:C" & [ÖĞRENCİLER!A65536].End(3).Row
End If
End With
MsgBox "Kayıt silme işlemi tamamlanmıştır.", vbInformation, "Kayıt Silme İşlemi"
Else
MsgBox "Kayıt silme işlemi iptal edilmiştir.", vbInformation, "İşlem İptali"
End If
End Sub
silme işlemini yapmıyor sanırım "Activecell" sayfa adı "ÖĞRENCİLER" şeklince değiştirlecek ancak nasıl?
