Date format in Excel 2000 macro

  User-9A919F67-6ADE-4BFB-8B35A0F56CB2F7D6 10:48 12 Nov 2003

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 2003

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 2003

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 2003

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.



  Simsy 11:25 12 Nov 2003

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



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 2003

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.

Elsewhere on IDG sites

Moto G6 Play Review: First Look

iPad 9.7in (2018) review

Test : les écouteurs Bluetooth Honor xSport AM61