Forum Discussion
ky_fung
Aug 09, 2022Copper Contributor
Format of Date displaced in Excel cell
I want to store the current date in day/month/year format for later use with the code below: Sub ShowDate() Dim myDate As String myDate = Format(Now, "DD/MM/YYYY") ThisWorkbook.Sheets(1).Ra...
Jagodragon
Aug 09, 2022Iron Contributor
have the macro change the format of the cell.
I think it's this:
ThisWorkbook.Sheets(1).Range("R20").NumberFormat = "DD/MM/YYYY;@"
I think it's this:
ThisWorkbook.Sheets(1).Range("R20").NumberFormat = "DD/MM/YYYY;@"