• DİKKAT

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

ListBox da Tıklamayı Engellemek.

Katılım
8 Mart 2007
Mesajlar
582
Excel Vers. ve Dili
excel 2000 Türkçe
Merhaba Arkadaşlar.

Aşağıdaki kodlarla ListBox da birer satır ara ile iki satır sayfa alt toplamlarını alıyorum. Bu iki satır alt toplamda tıklamayı engelleyebilir miyiz.

Kod:
Sub alttoplamAl()
  
    With ActiveSheet
        '.Unprotect 4455
        son = .Range("A" & Rows.Count).End(3).Row + 1
        .Range("A" & son & ":K" & Rows.Count).ClearContents
        .Range("D" & son + 1) = "TOPLAMLAR"
        son = .Range("D" & Rows.Count).End(3).Row
        .Range("E" & son) = WorksheetFunction.Sum(.Range("E7:E65536"))
        .Range("G" & son) = WorksheetFunction.Sum(.Range("G7:G65536"))
        .Range("I" & son) = WorksheetFunction.Sum(.Range("I7:I65536"))
        .Range("J" & son) = WorksheetFunction.Sum(.Range("J7:J65536"))
        .Range("K" & son) = WorksheetFunction.Sum(.Range("K7:K65536"))
                
        .Range("K" & son + 2).Value = Range("K" & son).Value
 If .Range("K" & son + 2).Value > 0 Then .Range("J" & son + 2).Value = "ALACAKLIYIZ:"
 If .Range("K" & son + 2).Value < 0 Then .Range("J" & son + 2).Value = "BORÇLUYUZ:"
        
        .Range("D7:L" & Rows.Count).Interior.ColorIndex = xlNone
        .Range("D" & son & ":L" & son).Interior.ColorIndex = 19
        .Range("D" & son).HorizontalAlignment = xlRight
        .Range("D7:K" & Rows.Count).Font.Bold = False
        .Range("D" & son & ":K" & son).Font.Bold = True
        '.Protect 4455
    End With
 
End Sub
 
Geri
Üst