My code have this line which is to insert current date in a cell:
The two last lines is only to copy format configuration from rows 2 to the line being added.
Supose that today is 8-may-2019, the problem is that sometimes I got 5/8/2019 and sometimes 8/5/2019 I didn't find a cause to this.
Ps1.: This is not a problem with date mask, cause the formulas which calculate date dif returns completely wrong number of days.
Ps2: In my area the default date format is dd/mm/yyyy.
Any ideas?
Thanks.
Code:
Application.ScreenUpdating = False
with sheets(1)
.Range("I" & LstRow) = Day(Now) & "/" & Month(Now()) & "/" & Year(Now())
.Range("I2:K2").Copy
.Range("I" & LstRow & ":K" & LstRow).PasteSpecial xlPasteFormats
Application.ScreenUpdating = True
end with
The two last lines is only to copy format configuration from rows 2 to the line being added.
Supose that today is 8-may-2019, the problem is that sometimes I got 5/8/2019 and sometimes 8/5/2019 I didn't find a cause to this.
Ps1.: This is not a problem with date mask, cause the formulas which calculate date dif returns completely wrong number of days.
Ps2: In my area the default date format is dd/mm/yyyy.
Any ideas?
Thanks.
Last edited: