eckert1961
Registered User.
- Local time
- Today, 12:22
- Joined
- Oct 25, 2004
- Messages
- 90
Hello,
I am running Excel 2003 and I want to use a macro that will enter the current date in the format dd-mmm-yy and the text UPDATE! into the selected cell. The result should look as follows.
04-Aug-08
UPDATE!
The problem that I run into is when I run the macro the date format changes to mm/dd/yyyy; ie 8/6/yyyy. Here is what my macro currently looks like.
ActiveCell.FormulaR1C1 = Date
ActiveCell.FormulaR1C1 = Date & Chr(10) & "" & Chr(10) & "UPDATE!"
Selection.NumberFormat = "dd-mmm-yy"
It appears that when you enter the date using a function and you enter text into the same cell you can't change the date format.
Would anyone know of a way to override this? Thanks in advance.
Regards,
Chris
I am running Excel 2003 and I want to use a macro that will enter the current date in the format dd-mmm-yy and the text UPDATE! into the selected cell. The result should look as follows.
04-Aug-08
UPDATE!
The problem that I run into is when I run the macro the date format changes to mm/dd/yyyy; ie 8/6/yyyy. Here is what my macro currently looks like.
ActiveCell.FormulaR1C1 = Date
ActiveCell.FormulaR1C1 = Date & Chr(10) & "" & Chr(10) & "UPDATE!"
Selection.NumberFormat = "dd-mmm-yy"
It appears that when you enter the date using a function and you enter text into the same cell you can't change the date format.
Would anyone know of a way to override this? Thanks in advance.
Regards,
Chris