- Katılım
- 14 Haziran 2006
- Mesajlar
- 129
Aşağıdaki koda ben Toplam sayfasında B25 den B100 e kadar hücrelerden birinde değişiklik olunca UserForm1 i açması komutunu eklemek istiyorum nasıl yaparım acaba....
Private Sub Worksheet_Change(ByVal Target As Range) ' Mükerrer kayıtı önler
ActiveSheet.Unprotect
For a = [b65536].End(3).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("b25:b" & a), Cells(a, "b")) > 1 Then Rows(a).Delete
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Next
End Sub
Private Sub Worksheet_Change(ByVal Target As Range) ' Mükerrer kayıtı önler
ActiveSheet.Unprotect
For a = [b65536].End(3).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("b25:b" & a), Cells(a, "b")) > 1 Then Rows(a).Delete
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Next
End Sub
