I want to fill a cell in a worksheet with the date as string and I want it to be in the dd/mm/yyyy format. I use the following code but it keeps showing as mm/dd/yyyy. I'm not sure what I am doing wrong since I already looked up the answer.
Private Sub CommandButton1_Click()
Dim date1 As String
date1 = Format(Date, "dd/mm/yyyy")
Worksheets("sheet1").Cells.Range("B1") = date1
End Sub
Best Answer
Format before placing a value in the cell: