• DİKKAT

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

Combobox tarih formatında "/" otomatik yazdırma

Katılım
6 Eylül 2006
Mesajlar
52
Excel Vers. ve Dili
exel 2003 Türkçe
merhaba arkadaşlar aşağıdaki kodda tarih yazarken tarih aralarına otomatik '.' nokta işareti getiriyor fakat ben bunu '/' slaş işareti koyduğumda olmuyor yardım edebilirmisiniz.

Kod:
Private Sub ComboBox6_Change()
If Menu.ComboBox6 <> "" Then
If Len(ComboBox6) = 2 Then
ComboBox6 = Format(ComboBox6, "0#"".")
End If
If Len(ComboBox6) = 5 Then
ComboBox6 = Format(ComboBox6, "0#"".""##"".")
End If
If Len(ComboBox6) = 10 Then
ComboBox6 = Format(ComboBox6, "0#"".""##"".""####")
End If
End If
End Sub
 
merhaba arkadaşlar aşağıdaki kodda tarih yazarken tarih aralarına otomatik '.' nokta işareti getiriyor fakat ben bunu '/' slaş işareti koyduğumda olmuyor yardım edebilirmisiniz.

Merhaba,

Bu şekilde deneyin.

Kod:
Private Sub ComboBox6_Change()
 
    On Error GoTo son
    
    If Menu.ComboBox6 <> "" Then
        If Len(ComboBox6) = 2 Then
            ComboBox6 = Format(CDate(ComboBox6 & ".01.2012"), "dd\/")
        End If
        If Len(ComboBox6) = 5 Then
            ComboBox6 = Format(ComboBox6, "dd\/mm\/")
        End If
        If Len(ComboBox6) = 10 Then
            ComboBox6 = Format(ComboBox6, "dd\/mm\/yyyy")
        End If
    End If
    Exit Sub
son:
    MsgBox "Girilen Değer Tarih Değil"
 
End Sub
.
 
Geri
Üst