Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an application which saves the output to .xls format. If I open the
file from Excel, I get the Text Import Wizard. There is a date/time column in format dd/mm/yyyy hh:mm However, If I use Application.Workbooks.Open to open the file, the date/time column is in format dd/mm/yy hh:mm ie the yyyy is shortened to 2 digits. Manually clicking into a cell and pressing enter updates the cell, as does Text to Columns. I have recorded some code to use DataText to Columns, but running the code does nothing. If the dates are in column L, the code is as follows: Columns("L:L").Select Selection.TextToColumns Destination:=Range("L1"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _ :=Array(1, 4), TrailingMinusNumbers:=True I have tried different methods of opening the file and of delimiting the text after it is open, but can't get the date correct. Can anyone help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
all cells in 2 workbooks have automaticlly changed to date format | Excel Worksheet Functions | |||
VBA Excel.WorkBooks.Open can't open an XML format xls file | Excel Programming | |||
Workbooks.Open incorrectly formating date column | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
Excel VBA - Activate Open Workbooks to format | Excel Programming |