Import text file : why do fractions in text format result in month/day?

H

hermac

If I manually import a .txt file with the DATA menu "Import Text File"
and specify column 1 as text and columns 2, 3 and 4 as general I get
de result I wanted. Fractions like 10/15 are shown as such.
I recorded this proces and , except for the first 2 lines, the code I
read is this :

Main.Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name =
"Import"
With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & FTO,
Destination:=Range("B1"))
.Name = "VanHool4_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileOtherDelimiter = "!"
.TextFileColumnDataTypes = Array(2, 1, 1, 1)
.Refresh BackgroundQuery:=False
End With

Then I wrote a sub where I added the first 2 lines ; the rest I just
pasted underneath. It works fine but SOME ratios in column 1 , like
10/15 , now show like oct/15 which I don't want.
Could anyone help me here? I really need that original 10/15 as
text.

Thank you very much for any input.

Herman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top