Hi everyone,
I'm currently having a VBA coding which correctly reports the date in the desired format ("DD/MM/YYYY"). However, in the excel sheet, the value is not recognized as a date. Whenever I click the cell and hit enter, it then is immediately set as a date. The cell first is aligned to the left, after selecting the cell and pressing "Enter", it is aligned to the right. How can update the VBA coding such that I do not have to press enter in the cell? (I've tried TextToColumns as advised by other sites, which unfortunately did not work)
The VBA coding
ThisWorkbook.Sheets(1).Cells(29, 1) = Format(Now, "DD/MM/YYYY")
ThisWorkbook.Sheets(1).Cells(29, 1).NumberFormat = "DD/MM/YYYY"
Other settings
With Application
.DisplayAlerts = True
.ScreenUpdating = True
.EnableEvents = True
.DisplayStatusBar = True
.Calculation = xlCalculationAutomatic
.AskToUpdateLinks = True
End With
I'm currently having a VBA coding which correctly reports the date in the desired format ("DD/MM/YYYY"). However, in the excel sheet, the value is not recognized as a date. Whenever I click the cell and hit enter, it then is immediately set as a date. The cell first is aligned to the left, after selecting the cell and pressing "Enter", it is aligned to the right. How can update the VBA coding such that I do not have to press enter in the cell? (I've tried TextToColumns as advised by other sites, which unfortunately did not work)
The VBA coding
ThisWorkbook.Sheets(1).Cells(29, 1) = Format(Now, "DD/MM/YYYY")
ThisWorkbook.Sheets(1).Cells(29, 1).NumberFormat = "DD/MM/YYYY"
Other settings
With Application
.DisplayAlerts = True
.ScreenUpdating = True
.EnableEvents = True
.DisplayStatusBar = True
.Calculation = xlCalculationAutomatic
.AskToUpdateLinks = True
End With