Mightyginger
Programmer
Say I have a function called Bob which has one parameter fed into it, a date.
Function Bob(whichformat As Date)
do some operations
End Function
My problem is that my country settings are UK and the date is in UK format but then interpret the date as US if it can be intepreted in that format or it'll swap the month and day and then use that as the date. My work around at the moment is to input the day,month and year as integers and then use the Date function.
To the point. Question is, is it possible to explicitly say to vba whichformat As Date BUT READ THIS ALWAYS AS A U.S. DATE FORMAT? So that if different people use it they just need to type the date in US format and the code will always be expecting US format.
Not looking for masses of code, just thought there might be a command tucked away somewhere with which I could do this.
Cheers,
Neil.
Function Bob(whichformat As Date)
do some operations
End Function
My problem is that my country settings are UK and the date is in UK format but then interpret the date as US if it can be intepreted in that format or it'll swap the month and day and then use that as the date. My work around at the moment is to input the day,month and year as integers and then use the Date function.
To the point. Question is, is it possible to explicitly say to vba whichformat As Date BUT READ THIS ALWAYS AS A U.S. DATE FORMAT? So that if different people use it they just need to type the date in US format and the code will always be expecting US format.
Not looking for masses of code, just thought there might be a command tucked away somewhere with which I could do this.
Cheers,
Neil.