View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default VBA Setting .Value to a date does not respect local system setting


the isdate function's description from vba help..
Returns a Boolean value indicating whether an expression
can be converted to a date.

the crux is in the word CAN..

I do admit that vba or excel's interpretation is somewhat loose.
plus there are some differences between VBA and Excel functions.

I ran a few loops (swapping system separators)
and determined that vba's string interpretation is based on ALL
of the following user's locale settings...

listseparator,decimalseparator,dateseparator,hours eparator
(optionally including the am pm indicators..)

funny as you'd expect it to be based on either
locale's or usenglish Date separator.

you may be interested in :
http://support.microsoft.com/default...;EN-US;Q214233

also see harlan grove's article "an interesting read" in
mp.excel.worksheetfunctions:
. com




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Frank_Hamersley" wrote:

"keepITcool" wrote
the only quirk is YOU seem determined to demonstrate
that if you cast a LOCALE date string to a cells's value you run the
risk of excel interpretation.


Reread the post and then explain why IsDate("5,011,554") returns TRUE
- that is the question (apols to the Bard).

Frank.