crazyjji
08-10-2009, 08:01 PM
The following is the code that I used to use, which worked fine before I reinstall window and thus the excel.
Sub MM()
Dim UPdate As Date
Range("A4").Formula = "=TODAY()"
UPdate = ActiveCell.Value
Range("A4").Value = UPdate
End Sub
However, after reinstallation, rather than the cell A4 being today's date, it shows 12:00:00 AM. So I have to use the following code to prevent this keep coming back.
Sub MM()
Dim UPdate As String
Range("A4").Formula = "=TODAY()"
UPdate = ActiveCell.Value
Range("A4").Value = UPdate
End Sub
What is wrong with my excel???????
The funny thing is if I execute the first code one and erase the cell and re-execute the code again, it works fine. Weird
Anyone know?????
Sub MM()
Dim UPdate As Date
Range("A4").Formula = "=TODAY()"
UPdate = ActiveCell.Value
Range("A4").Value = UPdate
End Sub
However, after reinstallation, rather than the cell A4 being today's date, it shows 12:00:00 AM. So I have to use the following code to prevent this keep coming back.
Sub MM()
Dim UPdate As String
Range("A4").Formula = "=TODAY()"
UPdate = ActiveCell.Value
Range("A4").Value = UPdate
End Sub
What is wrong with my excel???????
The funny thing is if I execute the first code one and erase the cell and re-execute the code again, it works fine. Weird
Anyone know?????