I have an excel workbook with many dates.
- On the worksheet they are in a format of "mm/dd/yy hh:mm"
- What I see in the white box above the sheet is in the format of "dd/mm/yy hh:mm"
I need to print the worksheets into text files, but when I do so, it's printing in the format of dd/mm/yy hh:mm
, Instead of mm/dd/yy hh:mm
.
Here's the code:
For i = 1 To LastRow
For j = 1 To LastCol
If j = LastCol Then
DataLine = DataLine + Trim(Cells(i, j).Value)
Else
DataLine = DataLine + Trim(Cells(i, j).Value) + vbTab
End If
Next j
If (DataLine <> "") Then
Print #FileNum, DataLine
DataLine = ""
End If
Next i
Does any one has an idea how to print the sheets in the format I need?