find current data with macro

  • Thread starter Francesco Magagnino
  • Start date
F

Francesco Magagnino

Hi,
i'm looking for the macro code to find out the current date and have
it in this format 20080905 (yyyymmdd)

it's should be easy but i don't find anything about it

please can anyone help me

thanks
francesco
 
F

Francesco Magagnino

Tnhanks!
i had tried this and it didn't work...
now i have understand!

i used:

Dim y As Date
y = Format(Date, "yyyymmdd")

but the right one was

Dim y As String
y = Format(Date, "yyyymmdd")

Bye bye
Franz
 
Top