Date checking

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
So I have some code which uses the Date, and Now functions.

All works fine on my computer and most others, however on the odd computer it is producing the dates in the American format.

Would this be to do with the system settings of the computer, or the settings in Excel?

And how can you check/change these settings?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Sorry, need to explain myself better. This is generated in VBA. And the date cannot be changed after as the form is automatically sent via email.

I have tried many different ways of formatting the value entered as the correct date, using CDate, and Format but none seem to universally work.

I don't really want to alter the code again, only to find that it doesn't work on another computer in 2 weeks time.

All I want to know is where the function Date, and Now retrieve their information from? Whether it is excel or from the system. And then how to check and amend this so they are consistent across all computers.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top