• DİKKAT

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

Makro ile Hücre kenarlığı

Mehmet Sait

Altın Üye
Katılım
19 Ekim 2009
Mesajlar
840
Excel Vers. ve Dili
Office 2016 TR
Merhabalar,

Aşağıdaki Kod hücre dolgusu atamakta, birde hücre kenarını çizmesi için ne yapmam gerek ?

sat = Cells(Rows.Count, "AB").End(xlUp).Row
If sat < 12 Then Exit Sub
For Each hcr In Range("AB12:AE" & sat)
If hcr.Value = "" Then hcr.Interior.ColorIndex = 15
 
. . .

Gibi olabilir mi ?

Kod:
sat = Cells(Rows.Count, "AB").End(xlUp).Row
If sat < 12 Then Exit Sub
For Each hcr In Range("AB12:AE" & sat)
If hcr.Value = "" Then 
hcr.Interior.ColorIndex = 15
hcr.Borders(xlEdgeLeft).LineStyle = xlContinuous
hcr.Borders(xlEdgeTop).LineStyle = xlContinuous
hcr.Borders(xlEdgeBottom).LineStyle = xlContinuous
hcr.Borders(xlEdgeRight).LineStyle = xlContinuous
hcr.Borders(xlInsideHorizontal).LineStyle = xlContinuous
 
. . .

Gibi olabilir mi ?

Kod:
sat = Cells(Rows.Count, "AB").End(xlUp).Row
If sat < 12 Then Exit Sub
For Each hcr In Range("AB12:AE" & sat)
If hcr.Value = "" Then 
hcr.Interior.ColorIndex = 15
hcr.Borders(xlEdgeLeft).LineStyle = xlContinuous
hcr.Borders(xlEdgeTop).LineStyle = xlContinuous
hcr.Borders(xlEdgeBottom).LineStyle = xlContinuous
hcr.Borders(xlEdgeRight).LineStyle = xlContinuous
hcr.Borders(xlInsideHorizontal).LineStyle = xlContinuous

Hocam,

Elinize sağlık teşekkür ederim. Kenarlığı gri renk ve çizgi biçimini ............ verebilirmiyiz ?
 
. . .

Kod:
On Error Resume Next
sat = Cells(Rows.Count, "AB").End(xlUp).Row
If sat < 12 Then Exit Sub
For Each hcr In Range("AB12:AE" & sat)
If hcr.Value = "" Then
hcr.Interior.ColorIndex = 15
hcr.Borders(xlEdgeLeft).Weight = xlHairline
hcr.Borders(xlEdgeLeft).ColorIndex = 56
hcr.Borders(xlEdgeTop).Weight = xlHairline
hcr.Borders(xlEdgeTop).ColorIndex = 56
hcr.Borders(xlEdgeBottom).Weight = xlHairline
hcr.Borders(xlEdgeBottom).ColorIndex = 56
hcr.Borders(xlEdgeRight).Weight = xlHairline
hcr.Borders(xlEdgeRight).ColorIndex = 56
hcr.Borders(xlInsideHorizontal).Weight = xlHairline
hcr.Borders(xlInsideHorizontal).ColorIndex = 56

. . .
 
. . .

Kod:
On Error Resume Next
sat = Cells(Rows.Count, "AB").End(xlUp).Row
If sat < 12 Then Exit Sub
For Each hcr In Range("AB12:AE" & sat)
If hcr.Value = "" Then
hcr.Interior.ColorIndex = 15
hcr.Borders(xlEdgeLeft).Weight = xlHairline
hcr.Borders(xlEdgeLeft).ColorIndex = 56
hcr.Borders(xlEdgeTop).Weight = xlHairline
hcr.Borders(xlEdgeTop).ColorIndex = 56
hcr.Borders(xlEdgeBottom).Weight = xlHairline
hcr.Borders(xlEdgeBottom).ColorIndex = 56
hcr.Borders(xlEdgeRight).Weight = xlHairline
hcr.Borders(xlEdgeRight).ColorIndex = 56
hcr.Borders(xlInsideHorizontal).Weight = xlHairline
hcr.Borders(xlInsideHorizontal).ColorIndex = 56

. . .

Yardımlarınız için teşekkür ederim.
 
Merhaba,

Mesajlarınıza cevap verirken "alıntı" yapmanıza gerek yok. Gereksiz yere forum belleğini şişirmiş oluyorsunuz. Lütfen buna dikkat ediniz...
 
Geri
Üst