This article was previously published under Q281125
IMPORTANT: This article contains information about modifying the registry. Before you
modify the registry, make sure to back it up and make sure that you understand how to restore
the registry if a problem occurs. For information about how to back up, restore, and edit the
registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986�
(http://support.microsoft.com/kb/256986/EN-US/
)
Description of the Microsoft Windows Registry
↑ Back to the top
If you use the Open method or the OpenText method to open a Comma Separated Value (.csv) file in Microsoft Excel 2000 through a Microsoft Visual Basic for Applications macro, the dates appear incorrect.
↑ Back to the top
This behavior occurs if the .csv file contains a date that is formatted in any other format than the Standard English (United States) format of M/d/yyyy.
Note This behavior will also occur if you change your system date setting to match the date format in the file that you are opening.
↑ Back to the top
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
To resolve this behavior, follow these steps:
- Close any programs that are running.
- On the Start menu, click Run, type regedit, and then click OK.
- In Registry Editor, expand the following key:
HKey_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\Options - On the Edit menu, point to New, and then click DWORD Value. With New Value #1 selected, type VBAAlwaysLoadUS, and then press ENTER.
↑ Back to the top
By design, the behavior in Microsoft Excel 2000 is different from past versions of Excel. The change in how the OpenText method translates dates was completed to align Excel 2000 with International date standards. By default, this date translation behavior occurs because Excel always uses the M/d/yyyy format when you use the OpenText method in Visual Basic for Applications. Considering this fact, Excel interprets imported dates according to this standard.
Note If you open the .csv file manually, Excel will not use the default M/d/yyyy. Instead, it will use the language date format that is set for the operating system environment.
↑ Back to the top
For more information about using the OpenText method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type OpenText in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Search for Open in Microsoft Visual Basic Help for more information about the Open method.
↑ Back to the top