Date format in Excel 2000 macro

I need to put a header of the current days date into an Excel 2000 spreadsheet, using a macro.

If I use date$ this gives the date in USA format, ie.e MM DD YYY. How do I get this to display in UK format, i.e. DD MM YYYY?

  Cesar 11:10 12 Nov 03

Go to Format >Cells> Number> Date> custom you will have to create your own, clear the type box and enter dd-mmm-yyyy and click ok, this will give you 12-Nov-2003 if you want the month in full ad an extra m

  Taff36 11:12 12 Nov 03

If you go to the File > PAGE SETUP > HEADER & FOOTER tab you should just be able to click the icon (Looks like a calendar) an it will insert the date for you. The formula is &[Date]

  Simsy 11:24 12 Nov 03

this is using a button...

Private Sub CommandButton1_Click()

Dim todaysdate As Date

todaysdate = Date

Range("A1").Value = Format(todaysdate, ("dd mmm yyyy"))

End Sub

I hope you can decipher enough of this to make what you want work.

Regards,

Simsy

  Simsy 11:25 12 Nov 03

I've beaten Vog on an Excel thread!!!

Regards,

Simsy

I should have given you a few more details.

When I create a new Chart, and select an Area graph, I then get to where I can enter the Chart Title. In here I want it to display the current days date, as say "Wednesday 12 November 2003". Is there a way that I can get the macro to insert the date in this format?

As you can probably tell I don't use Excel all that much. This has been dumped on me by my Operations Manager to make life easier for everybody else.

He wants it so that all his staff have to do is start one macro, and it will go away, grab all the data from another system, format it, then print out a neat little graph with the current days date as the title.

Glad it makes their life easier :)

  VoG II 13:00 12 Nov 03

ActiveChart.ChartTitle.Characters.Text = Format(Now(), ("dddd dd mmm yyyy"))

That worked.

Thanks everybody.

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…