What is the serial number for the short date?

I know that I can write the following to format the number as a date with the advent of yyyy-mm-dd:

Range("A1").NumberFormat = "yyyy-mm-dd"

I know that I can also write:

Range("A1").NumberFormat = "m/d/yyyy"

and all kinds of things.

But is there a way for the number format to become a common short date and leave it up to the user system to determine the exact appearance?

I am looking for an expression like:

Range("A1").NumberFormat = "Short Date" '(<-This does not work)
+4
source share
2 answers

. , , , , (*), . , , numberformat ?activecell.NumberFormat. , "m/d/yyyy", . , .

+7

,

 Format(Range("A1"), "Short Date")

.

-3

All Articles