opening CSV file in Excel 2010 from VBA

S

Sonnich Jensen

Hi

This should work

Workbooks.Open Filename, Format:=4, Delimiter:=";"

but it opens so, that all my semicolon separated text is on on coloumn
- what do I do wrong?

Sonnich
 
J

James Ravenswood

Hi

This should work

    Workbooks.Open Filename, Format:=4, Delimiter:=";"

but it opens so, that all my semicolon separated text is on on coloumn
- what do I do wrong?

Sonnich

I tried your code using Excel 2007 and it worked perfectly:

Sub Sonnich()
Dim Filename As String
Filename = "C:\TestFolder\test.txt"
Workbooks.Open Filename, Format:=4, Delimiter:=";"
End Sub
 

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