opening txt-files in excel


Posted by Sebastiaan on June 26, 2001 6:10 AM

good afternoon,

i want to open a txt-file in excel
the values are devided by a semicolon
i can manage to open the file by hand but i can't find the codefor the macro
so i can automaticly open the txt-file when i start the excel sheet.
can you point me in the right direction?

best regards,

sebastiaan stroowinder

Posted by IML on June 26, 2001 8:50 AM


Good morning (Mountain Daylight time)
If I understand you correctly, highlight your column use Text to Columns under the data menu. Select Delimited, next and choose Semi-colon as you deliminater.
good luck.



Posted by mseyf on June 26, 2001 9:06 AM

check the OpenText method in help:

Workbooks.OpenText Filename := "C:\path\filename.txt" , etc.

HTH

Mark