question

AzimAzrul-9488 avatar image
0 Votes"
AzimAzrul-9488 asked TvanStiphout answered

VBA form interpret the data in the excel worksheet wrongly.

What is the solution for date format in the excel VBA form? Im still new with the excel VBA. When I key in the date in the VBA form using this format [dd/mm/yyyy], it will interpret automatically as [mm/dd/yyyy] in the worksheet. My computer system settings for the date format is in [dd/mm/yyyy] and the excel date format is [dd/mm/yyyy] (I tried to put it as General and custom, both didnt work). Is there any solution for this? The VBA coding might help I guess.

Thanks in advance for the help guys!

office-vba-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TvanStiphout avatar image
0 Votes"
TvanStiphout answered

When you write code in VBA, the only acceptable date format is US format. MSFT is a US company, and they got to choose.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.