Recently, I have a project needed to extract some data from ASCII format into Excel using VBA. Everything was fine, but I got the problem of in Date Formating. The source Date format is in UK format
e.g. 08/11/2008 for 8th Nov, 2008. However, when the date was read into Excel, it changed into US format automatically, and become 11th Aug, 2008, which obvious was wrong. After some reason I finally managed to solve this problem by using the following 2 steps
1. Change the Regional and Language Setting in the Control Panel form English (US) to English (UK).
2. Format( ) function in VBA. The sample code is as followed.
Cells(1, 1) = Format("08/11/2008", "mm/dd/yyyy")
The above function can force the VBA to read the input string and change it to the US format, which I believe is the default format embedded in Excel.