LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel Addin altering date format on text file import

Hi,

I have an Excel addin (written in VBA) which includes the following line in
a function to open files;

Excel.Application.Dialogs(xlDialogOpen).Show


I am opening a text file which is a list of tab-delimited pairs like;
1 1/3/04
2 2/5/04
3 5/8/04

These dates are ambiguous, in that they are valid dates in either DMY format
or MDY format. My computer's Regional Settings are setup for DMY format, and
in Excel normally, opening this file imports the dates to cells as-is (in DMY
format).

However, with my addin installed, and nothing but the earlier line of code
involved, Excel changes those dates so they are read as MDY formatted. (The
difference can be seen by changing the format of the cells after import to
some non-ambiguous format, e.g; Wednesday, 1st March, 2004)


Any idea why importing this file in an addin context causes the dates to be
formatted unnecessarily?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date conversion on text file import Calmack Excel Discussion (Misc queries) 5 November 11th 08 06:39 PM
Please help me with altering text in excel Mark New Users to Excel 5 November 16th 06 04:33 AM
Cell format with Data Import (date appearing as text) Louise Excel Discussion (Misc queries) 3 September 21st 06 01:57 PM
Date format not correct when you convert a CSV text file in Excel Scarab Excel Discussion (Misc queries) 2 November 16th 05 12:22 PM
Import text file into excel with preset file layout, delimeters VBA meldrape Excel Programming 7 June 15th 04 08:31 PM


All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"