• DİKKAT

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

Listview biçimlendirme

Katılım
9 Nisan 2009
Mesajlar
113
Excel Vers. ve Dili
2007 türkçe
Arkadaşlar,

Yardımınızı bekliyorum,

Aşağıdaki kodlar ile listview üzerinde tarihe göre renklendirme yapabiliyorum. Bu uygulamaya bir koşul daha ilave etmek istiyorum

(Cells(i, 23)) içerisinde "Açık" yazıyorsa biçimlendirme çalışsın
(Cells(i, 23)) içerisinde "Kapalı" yazıyorsa biçimlendirme çalışmasın renk siyah olsun




If IsDate(Cells(i, 17)) Then
If Cells(i, 17) < Date Then
lcolor = vbRed
ElseIf Cells(i, 17) = Date Then
lcolor = vbBlue
Else
lcolor = vbBlack
End If
Else
lcolor = vbBlack
End If

ListView1.ListItems(i - 1).ForeColor = lcolor
For j = 1 To 24
Liste.ListSubItems(j).ForeColor = lcolor
Next j
 
Arkadaşlar,

Yardımınızı bekliyorum,

Aşağıdaki kodlar ile listview üzerinde tarihe göre renklendirme yapabiliyorum. Bu uygulamaya bir koşul daha ilave etmek istiyorum

(Cells(i, 23)) içerisinde "Açık" yazıyorsa biçimlendirme çalışsın
(Cells(i, 23)) içerisinde "Kapalı" yazıyorsa biçimlendirme çalışmasın renk siyah olsun



If IsDate(Cells(i, 17)) Then
If Cells(i, 17) < Date Then
lcolor = vbRed
ElseIf Cells(i, 17) = Date Then
lcolor = vbBlue
Else
lcolor = vbBlack
End If
Else
lcolor = vbBlack
End If

ListView1.ListItems(i - 1).ForeColor = lcolor
For j = 1 To 24
Liste.ListSubItems(j).ForeColor = lcolor
Next j

Böyle denermisiniz.

Kod:
If Cells(i, 23) = "Açık" Then
If IsDate(Cells(i, 17)) Then
If Cells(i, 17) < Date Then
lcolor = vbRed
ElseIf Cells(i, 17) = Date Then
lcolor = vbBlue
Else
lcolor = vbBlack
End If
Else
lcolor = vbBlack
End If
Else
lcolor = vbBlack
End If

ListView1.ListItems(i - 1).ForeColor = lcolor
For j = 1 To 24
Liste.ListSubItems(j).ForeColor = lcolor
Next j
 
çok teşekkür ederim.
 
Geri
Üst