Q1. In this function, what does the final "@" mean?
.Format(Sheet1.Range("A1"), "dd/mm/yyyy;@")
[I'm guessing it means "format this field as TEXT" (in addition to the "dd/mm/yyyy" instruction) but I need to be certain.]
Q2. If this means it's possible to combine multiple formatting parameters into one command, is this available in all versions of Excel or it did become available only as of a particular version?
WHY? I publish a commercial add-in and need my code to be compatible with as many versions of Excel as possible.
I need to format dates independently of the operating system's regional settings (in other words, ignore the Windows Control Panel "Region" setting), so currently I am using two statements:
.Range("A1").NumberFormat = "@"
.Range("A1") = Format(myDate, "mm/dd/yyyy")
From the function above, maybe I can combine these two into a single statement, like this:
.Range("A1") = Format(myDate, "mm/dd/yyyy;@")
Thanks, experts!