• DİKKAT

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

kod çakışması

  • Konbuyu başlatan Konbuyu başlatan nane
  • Başlangıç tarihi Başlangıç tarihi
Katılım
26 Ocak 2006
Mesajlar
304
Excel Vers. ve Dili
Excel 2007 tr
Merhabalar;
Kodlar ile ilgili fazla bilgim yok. Aynı sayfada kullanılmak üzere forumdan aldığım aşağıdaki kodlarda çakışma oluyor. Sanırım aynı ismi taşıyorlar. Bu her iki kodun da çalışması için nasıl değişiklik yapmam gerekiyor.
Yardımlarınızı bekliyorum.
Yb®

Kodlar

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column < 3 Then Application.MoveAfterReturnDirection = xlDown
If Target.Column > 26 Then
Application.MoveAfterReturnDirection = xlDown
Cells(Target.Row + 1, 3).Select
End If
If Target.Row = 4 Or Target.Row = 5 Then
Application.MoveAfterReturnDirection = xlDown
ElseIf Target.Row > 5 And Target.Row < 21 Then
Application.MoveAfterReturnDirection = xlToRight
Else
Application.MoveAfterReturnDirection = xlDown
End If
End Sub

Dim adr, olcu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If adr <> Empty Then Range(adr).Font.Size = olcu
Cancel = True
If ActiveCell <> "" Then
adr = ActiveCell.Address
olcu = ActiveCell.Font.Size
ActiveCell.Font.Size = 20
End If
End Sub
 
Aşağıdaki kodları dener misiniz
Kod:
Dim adr, olcu
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If adr <> Empty Then Range(adr).Font.Size = olcu
    Cancel = True
    If ActiveCell <> "" Then
        adr = Target.Address
        olcu = Target.Font.Size
        Target.Font.Size = 20
    End If
    If Target.Column < 3 Then Application.MoveAfterReturnDirection = xlDown
    If Target.Column > 26 Then
        Application.MoveAfterReturnDirection = xlDown
        Cells(Target.Row + 1, 3).Select
    End If
    If Target.Row = 4 Or Target.Row = 5 Then
        Application.MoveAfterReturnDirection = xlDown
    ElseIf Target.Row > 5 And Target.Row < 21 Then
        Application.MoveAfterReturnDirection = xlToRight
    Else
        Application.MoveAfterReturnDirection = xlDown
    End If
    

End Sub
 
Son düzenleme:
düzeltme :dalgalikur hızlı cevap verdiği için cevap silindi.
 
Aşağıdaki kodları dener misiniz
Kod:
Dim adr, olcu
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If adr <> Empty Then Range(adr).Font.Size = olcu
    Cancel = True
    If ActiveCell <> "" Then
        adr = Target.Address
        olcu = Target.Font.Size
        Target.Font.Size = 20
    End If
    If Target.Column < 3 Then Application.MoveAfterReturnDirection = xlDown
    If Target.Column > 26 Then
        Application.MoveAfterReturnDirection = xlDown
        Cells(Target.Row + 1, 3).Select
    End If
    If Target.Row = 4 Or Target.Row = 5 Then
        Application.MoveAfterReturnDirection = xlDown
    ElseIf Target.Row > 5 And Target.Row < 21 Then
        Application.MoveAfterReturnDirection = xlToRight
    Else
        Application.MoveAfterReturnDirection = xlDown
    End If
    

End Sub

dalgalikur teşekkürler;
Fakat aktif hücrede font büyümesi anlık oluyor ve eski font 11 degerine hemen dönüyor. Oysa imlecin seçili olduğu hücre veya tüm satır 20 font olarak gözükmeli ide o hücreden çıkıldığında ise 11 fonta dönmeli. Yani burada amaç imlecin olduğu hücreyi büyüteçle büyütmek.

Yb®
 
Geri
Üst