Reputation: 3
I'm facing a problem here in Excel VBA.
I set Today()
as values in the column and the result display is 2015/1/6 0:00 but in other computer, the result is 42010.
Guys, do you have any solution to avoid this problem to occur in a different pc?
This problem occur when I trying to copy and paste from one sheet to another sheet in other pc. I want the result 2015/1/6 0:00 to be display in all computers.
Upvotes: 0
Views: 551
Reputation:
That does not appear to be a regular date format by any international regional standard so you will have to format the cell (Ctrl+1) on the worksheet using a custom number format or with a subsequent VBA line like,
Range("A2:A10").NumberFormat = "yyyy/m/d h:mm"
If you are already in VBA, the latter solution provides more versatility.
Upvotes: 1