View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Doerk Doerk is offline
external usenet poster
 
Posts: 2
Default How to find out country-dependent Format Codes

Hi

I fill cells with date-values via OLE from non office/VB application.

If I submit a number and set the NumberFormat of the cell to 'mm/dd/yyyy', it is correctly interpreted...for an english installation. Problem: Switching to a german installation for example will not work. This is because the Format Codes are not understood by Excel. In Germany it is required to format the year as 'JJJJ' and not 'yyyy'. I want to build an international application, which automatically chooses the right characters

Could anyone tell me, how I can detect the language/country/locale dependent valid format codes for year, day etc. ? Is it an excel property, or do I have to look in the registry

Please help

Dirk