DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Workbook_Activate()
Application.OnKey "{DELETE}", "Satir_Sil"
End Sub
Private Sub Workbook_Deactivate()
Application.OnKey "{DELETE}"
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If ActiveSheet.Name = "Sayfa1" Then
Application.OnKey "{DELETE}", "Satir_Sil"
Else
Application.OnKey "{DELETE}"
End If
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If ActiveSheet.Name = "Sayfa1" Then
If Target.Column > 1 Then
Application.OnKey "{DELETE}"
Else
Application.OnKey "{DELETE}", "Satir_Sil"
End If
End If
End Sub
Sub Satir_Sil()
If ActiveSheet.Name = "Sayfa1" Then
If ActiveCell.Column = 1 Then
ActiveCell.EntireRow.Delete
End If
End If
End Sub
Private Sub Workbook_SheetChange(ByVal Sayfa As Object, ByVal Target As Range)
If (Target.Address = Target.EntireColumn.Address) Then
With Application
.EnableEvents = False
.Undo
MsgBox "Sütunları Silemezsiniz!", 16
.EnableEvents = True
End With
Else
Exit Sub
End If
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
Dim aCell As Range
For Each aCell In Target.Cells '-- Target may contains more than one cells.
If aCell.Formula = "" Then
Application.EnableEvents = False
Rows(aCell.Row).EntireRow.Delete
Application.EnableEvents = True
End If
Next
End Sub