Bonjour,

J'ai une date dans un fichier que je veux envoyer dans un autre en gardant le format STANDARD dans Excel

Voici un petit bout de mon code. j'ai essayé de travailler avec (LEFT, MID, RIGHT) et les ".text" pour garder mon format mais toujours la date continue de ss'inscrire en format de DATE. voyez à la ligne 3

Merci
Charles

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 For j = 0 To 9
Cells(Fonds, colonnedepart + j * 5).Value = Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 3).Text
Cells(Fonds, colonnedepart + j * 5 + 1).Value = Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 4).Text
Cells(Fonds, colonnedepart + j * 5 + 2).Value = Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 5).Text
Cells(Fonds, colonnedepart + j * 5 + 3).Value = Left(Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 6).Text, 2) & "-" & Mid(Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 6).Text, 4, 2) & "-" & Right(Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 6).Text, 4)
Cells(Fonds, colonnedepart + j * 5 + 4).Value = Workbooks(WORKBOOK_DATA).Sheets(SHEET_TRAVAIL_DATA).Cells(lignedepart, 7).Text