View Single Post
  #2   Report Post  
Peter Rooney
 
Posts: n/a
Default

Hi!

Try the following:

Selection.Value = "=NOW()"
Selection.NumberFormat = "ddd dd-mmm-yy"
Selection.Formula = Selection.Value

The first line puts the =now() formula into the currently selected cell
The second line formats the entry to Mon 21-Mar-05 etc
The third line converts =now() to a value, otherwise, tomorrow when you open
the workbook, the formula will show tomorrow's date!

Hope this helps

Pete



"mrbalaje" wrote:

I am using macros in my excel sheets. Can anyone tell me how i can assign the
current date using macros.