• DİKKAT

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

kod birleştirme

muhsar

Altın Üye
Katılım
16 Mart 2019
Mesajlar
281
Excel Vers. ve Dili
2010 tütkçe
bu iki kodu birleştirip aynı sahifenin kod sayfasında kullanmak istiyorum.yapamadım.
1.kod b sütununa çift tıklayınca günün tarihini yazıyor.
2 kod c sütununa çift tıklayınca takvimden gün seçiyorum


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, [B1:B65000]) Is Nothing Then Exit Sub
Cancel = True
Target = Date
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("c2:c50")) Is Nothing Then Exit Sub
Cancel = True
Takvim.Show
End Sub
 
Kod:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Cancel = True
    If Not Intersect(Target, [B1:B65000]) Is Nothing Then
        Target = Date
    ElseIf Not Intersect(Target, Range("c2:c50")) Is Nothing Then
        Takvim.Show
    End If
End Sub
 
Kod:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Cancel = True
    If Not Intersect(Target, [B1:B65000]) Is Nothing Then
        Target = Date
    ElseIf Not Intersect(Target, Range("c2:c50")) Is Nothing Then
        Takvim.Show
    End If
End Sub

çok teşekkür ederim elinize sağlık
 
bu iki kodu birleştirip aynı sahifenin kod sayfasında kullanmak istiyorum.yapamadım.
1.kod b sütununa çift tıklayınca günün tarihini yazıyor.
2 kod c sütununa çift tıklayınca takvimden gün seçiyorum


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, [B1:B65000]) Is Nothing Then Exit Sub
Cancel = True
Target = Date
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("c2:c50")) Is Nothing Then Exit Sub
Cancel = True
Takvim.Show
End Sub

Bilgi olsun diye. Başlık mükerrer olduğu için çalışmıyor. Yani aynı başlıkla iki kod yazamazsınız.
Sağlıklı günler dilerim.
Saygılarımla.
 
Geri
Üst