Bonjour a tous, forum bonjour,
Salut yvouille,
un bout de code et une photo de ce que cela donne sur ma compta
en souhaitement que cela t'aide
bonne journée
Cordialement Raymond
'*** AFFICHER LA DATE COMPLETE EN COLONNE D N°4
Sub AfficheDate()
Dim Ok As Boolean
With Selection
If .Row = 1 Or .Row = 41 Then Exit Sub 'Test pour ne pas afficher la date en ligne (1 et 41)
Ok = True
With Cells(.Row, 6)
.Value = WorksheetFunction.Proper(Format(Date, "mm/dd/yyyy"))
End With
With Cells(.Row, 4) 'On écrit la date, ou on l'efface
If Ok And .Value = "" Then 'Les deux dd pour 02 du mois
.Value = WorksheetFunction.Proper(Format(Date, "dddd dd mmmm yyyy"))
.Font.Color = 1 'Mode standard
.Font.Bold = True
With .Characters(1, 1).Font '1er caractère du JOUR
.ColorIndex = 3 'Rouge Jour
.Bold = True
End With '1er caractère du MOIS variable
'Les deux dd pour 02 du mois
With .Characters(Len(Format(Date, "dddd dd X")), 1).Font
.ColorIndex = 3 'Rouge Mois
.Bold = True
End With
End If
End With
End With
End Sub