• DİKKAT

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

Hücreye Saat ve tarih Yazdırmak

Üstadlar iyi geceler 16 numaralı mesajımdaki örnek dosyada D,E ve F sütünundan metin silmek istedim Run-time error '13'; Type
mismatch hatası veriyor.Ayrıca B sütunundaki tarih ile C sütunundaki
saatinde D,E ve F sütünundaki verileri silince otomatik olarak
silinmesini nasıl sağlarız.Bu iki sorunuma bir çözüm yolu yazarsanız
çok sevinirim.Teşekkürler.
 
Aşağıdaki kodu deneyiniz.

Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Veri As Range
    If Intersect(Target, [d3:e500]) Is Nothing Then GoTo 10
    If Cells(Target.Row, "a") = "" Or Cells(Target.Row, "b") = "" Then
    Cells(Target.Row, "b") = Format(Date, "dd/mm/yyyy")
    Cells(Target.Row, "c") = Format(Time, "hh:mm")
    End If
    
10:
    If Intersect(Target, [f3:f500]) Is Nothing Then Exit Sub
    If Target.Cells.Count > 1 Then
        For Each Veri In Selection
            If Veri.Column >= 4 And Veri.Column <= 6 Then
                If Veri = "" Then
                    Cells(Veri.Row, 2) = ""
                    Cells(Veri.Row, 3) = ""
                End If
            End If
        Next
    Else
        If UCase(Target) = "PASİF" Or UCase(Target) = "PASIF" Then
        Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
            With Selection
                .Font.Bold = True
                .Interior.Color = 255
            End With
            Target.Select
        Else
        Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
            With Selection
                .Font.Bold = False
                .Interior.Pattern = xlNone
            End With
            Target.Select
        End If
    End If
End Sub
 
Geri
Üst