Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have a comma-separated text file with several pieces of data in it. I'm doing this sort of thing to read them in: Dim ID Dim DateVar Dim Name Dim CodeNo Open "import.txt" For Input As #1 Do Until EOF(1) Input #1, ID Input #1, DateVar Input #1, Name Input #1, CodeNo 'Data processing code here Loop Close #1 The trouble is that the dates aren't reading in properly. The lines in the file are in this format: 1,13/03/2004,Chris,4745 2,27/06/2004,Josh,5684 etc. The problem is that after running the code above, the DateVar variable only holds the day, not the month (ie. 13 instead of 13/03/2004). If I change Dim DateVar to Dim DateVar As Date, then I get an Overflow (RTE 6). Any ideas as to how to get the date reading properly? Thanks Chris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copnvert dates reading as Text to a date format | Excel Discussion (Misc queries) | |||
Reading from a text file | Excel Discussion (Misc queries) | |||
Reading a text file ? | Excel Worksheet Functions | |||
Reading a text file | Excel Discussion (Misc queries) | |||
Help reading in a text file | Excel Programming |