- Katılım
- 22 Mayıs 2009
- Mesajlar
- 1,017
- Excel Vers. ve Dili
- Office 2003
Private Sub Worksheet_Change(ByVal Target As Range)
Dim S1 As Worksheet, GENİŞLİK As Integer, YÜKSEKLİK As Integer
Dim VERİ As Variant, Satır As Integer, X As Integer
If Intersect(Target, Range("B16:K16")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
GENİŞLİK = Range("B16:K16").Columns.Width
Set S1 = Sheets.Add
Satır = 2
Application.DisplayAlerts = False
With S1
.Cells.Font.Size = Target.Font.Size
.Range("B1") = "=Sayfa2!B16"
.Range("B:B").WrapText = True
.Range("B1").VerticalAlignment = xlJustify
.Range("B1").ColumnWidth = GENİŞLİK / 5.3
.Range("B1").EntireRow.AutoFit
VERİ = Split(.Range("B1"), Chr(10))
For X = 0 To UBound(VERİ)
.Cells(Satır, 1) = VERİ(X)
YÜKSEKLİK = YÜKSEKLİK + .Cells(Satır, 1).RowHeight
Satır = Satır + 1
Next
.Delete
End With
Target.RowHeight = YÜKSEKLİK
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Kod : Korhan Uzmanıma aittir.
Yukarıda ki kodu kendi sayfama uyarlamak istedim ama beceremedim.
Amacım B16:K16 birleştirilmiş hücrede yazdığım metne göre birleştirilmiş hücrenin otomotik olarak ayarlanıp iki yana yaslanmış şekilde ortaya çıkması. Yazıda en son cümlenin altında bir satır boşluk verecek şekilde ayarlanmalı
Rica etsem yardımcı olabilir misiniz?
Dim S1 As Worksheet, GENİŞLİK As Integer, YÜKSEKLİK As Integer
Dim VERİ As Variant, Satır As Integer, X As Integer
If Intersect(Target, Range("B16:K16")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
GENİŞLİK = Range("B16:K16").Columns.Width
Set S1 = Sheets.Add
Satır = 2
Application.DisplayAlerts = False
With S1
.Cells.Font.Size = Target.Font.Size
.Range("B1") = "=Sayfa2!B16"
.Range("B:B").WrapText = True
.Range("B1").VerticalAlignment = xlJustify
.Range("B1").ColumnWidth = GENİŞLİK / 5.3
.Range("B1").EntireRow.AutoFit
VERİ = Split(.Range("B1"), Chr(10))
For X = 0 To UBound(VERİ)
.Cells(Satır, 1) = VERİ(X)
YÜKSEKLİK = YÜKSEKLİK + .Cells(Satır, 1).RowHeight
Satır = Satır + 1
Next
.Delete
End With
Target.RowHeight = YÜKSEKLİK
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Kod : Korhan Uzmanıma aittir.
Yukarıda ki kodu kendi sayfama uyarlamak istedim ama beceremedim.
Amacım B16:K16 birleştirilmiş hücrede yazdığım metne göre birleştirilmiş hücrenin otomotik olarak ayarlanıp iki yana yaslanmış şekilde ortaya çıkması. Yazıda en son cümlenin altında bir satır boşluk verecek şekilde ayarlanmalı
Rica etsem yardımcı olabilir misiniz?
