• DİKKAT

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

çalışan satırların büyümesi

Katılım
25 Aralık 2008
Mesajlar
176
Excel Vers. ve Dili
2010 Türkçe
Merhabalar..

Ekteki örnek dosyada Sayın Necdet hocamın yazmış olduğu kod var.Çok güzel emeğine sağlık bir çalışmamda kullanmak için;
1-Satırlar A, y aralığında büyüyebilir mi
2-Satır büyümesi şimdiki durumda kalsada (A,Y aralığı olmasada olur) satır konrol sonrası bir önceki durumuna dönmesi için yazılan kod güncelenirse çok makbule geçecektir.
 

Ekli dosyalar

arkadaşlar birde bu satıra kırmızı renk nasıl verilir. Yani büyümenin yanında satırlardaki veriler kırmızı olacak
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Row < 1 Then Exit Sub
Dim SonSat As Long

SonSat = Cells.Find("*", , , , xlByRows, xlPrevious).Row
Application.ScreenUpdating = False

With Range("A1:Y" & SonSat)
.RowHeight = 12.75
.Font.Size = 10
.Font.ColorIndex = 0
End With

With Range("A" & Target.Row & ":Y" & Target.Row)
.RowHeight = 30
.Font.Size = 18
.Font.ColorIndex = 3
End With

Application.ScreenUpdating = True

End Sub
 
Merhaba,

Boş bir hücreye tıklandığında normale döner.
aşağıdaki kırmızı satırlar mevcut kodlara eklendi.

Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 
If Target.Row < 11 Then Exit Sub
Dim SonSat As Long
 
SonSat = Cells.Find("*", , , , xlByRows, xlPrevious).Row
Application.ScreenUpdating = False
 
With Range("A11:Y" & SonSat)
.RowHeight = 12.75
.Font.Size = 10
[B][COLOR=red].Interior.ColorIndex = xlNone[/COLOR][/B]
End With
 
[B][COLOR=red]If Target.Value = "" Then Exit Sub[/COLOR][/B]
 
With Range("A" & Target.Row & ":Y" & Target.Row)
.RowHeight = 30
.Font.Size = 18
[B][COLOR=red].Interior.ColorIndex = 3[/COLOR][/B]
End With
 
Application.ScreenUpdating = True
 
End Sub
 
abi şu şekilde yazıların da sarı olmasını istiyorum olmuyor. Neden?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Row < 11 Then Exit Sub
Dim SonSat As Long

SonSat = Cells.Find("*", , , , xlByRows, xlPrevious).Row
Application.ScreenUpdating = False

With Range("A11:Y" & SonSat)
.RowHeight = 12.75
.Font.Size = 10
.Interior.ColorIndex = xlNone
.Font.ColorIndex = xlNone
End With

If Target.Value = "" Then Exit Sub

With Range("A" & Target.Row & ":Y" & Target.Row)
.RowHeight = 30
.Font.Size = 18
.Interior.ColorIndex = 3
.Font.ColorIndex = 6
End With

Application.ScreenUpdating = True

End Sub
 
Geri
Üst