![]() |
Problem with OpenText in Excel 2000 (date format)
I am writing a macro to import data in a txt file (tab delimited
values) for further processing. Until this date issue everything worked out just fine... :( I have a column that contains dates (actually timestamp) in dd-mm-yyyy hh:nn format. I modified my opentext call to set DMY format like this: Call Workbooks.OpenText(Filename:="D:\working\test\data .txt", _ DataType:=xlDelimited, _ DecimalSeparator:=",", ThousandsSeparator:=".", _ FieldInfo:=Array(Array(15, xlDMYFormat), Array(16, xlDMYFormat))) However the resulting column is shown as text (I need this to be a date because a chart use dates in this column). If I manually select each cell in this column, press F2 and ENTER (enter and exit edit mode without modify anything), automatically Excel recognize the field as Date! Any idea how to get automatically all column data converted to dates? regards |
Problem with OpenText in Excel 2000 (date format)
Testing and testing again just make me realize that a strange thing is
happening: I record a macro and open text file from Excel menu, works fine. Run the macro will just fail to convert dates!!! It seams this feature is not working only for VBA calls! |
All times are GMT +1. The time now is 10:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com