Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:14:14+00:00 2026-05-11T14:14:14+00:00

How does one open a semicolon delimited CSV file with VBA in Excel 2000?

  • 0

How does one open a semicolon delimited CSV file with VBA in Excel 2000?

Sample data

An ID;TEST20090222 A Name;Firstname Surname A Date;11.05.2000  Country:;SomeCountryName Currency;EUR CostA; CostB; CostC; Part1;10;20;30 Part2;;;; Part3;34;56;87 

Code

In Excel 2003 11.8231.8221 SP3 with VBA 6.5.1025, I can open a semicolon delimited file with the following VBA code:

Workbooks.OpenText filename:=myFilename, _     DataType:=xlDelimited, Semicolon:=True, Local:=True 

However, when the same code is run in Excel 2000 9.0.8961 SP1 with VBA 6.5.1025, I get the following error:

Compile error: Named argument not found

That is –I think– because Excel 2000 doesn’t know the named argument ‘Local’.

Therefore, I deleted the ‘Local:=True’ part. But the problem then is that an entire line from the CSV file is written into one cell instead of being split up into the separate semicolon delimited parts.

I have searched the Internet for a solution, but did not find anything useful and concise.

Any ideas?

[Update 17.02.2009]

I tried the suggestion from user lc with the macro recorder. However, the results were confusing.

When I open the CSV file with menu File->Open… and then select the CSV file, the semicolon separated data is correctly parsed. And the recorded code is as simple as:

Workbooks.Open filename:= _                'D:\testdata\Example 01 CSV\input.csv' 

But when I use that VBA code in my macro, each line ends up in one cell again.

According to the suggestion from user barrowc, I also changed the The Windows ‘Regional and Language Options’ settings from ‘German (Switzerland)’ to ‘English (United States)’. Even after restarting Excel, nothing changed, same problem.

I wonder why it is working on user Remou‘s system. What regional and language settings do you have?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:14:15+00:00Added an answer on May 11, 2026 at 2:14 pm

    [Update 22.02.2009]

    In the meantime, I solved the problem by writing an import function myself instead of using Workbooks.OpenText.

    I just open the CSV file as a text file, read line by line, split each line into the semicolon separated elements and write each element into a cell.

    Sub ImportCSVFile(filepath As String)     Dim line As String     Dim arrayOfElements     Dim linenumber As Integer     Dim elementnumber As Integer     Dim element As Variant      linenumber = 0     elementnumber = 0      Open filepath For Input As #1 ' Open file for input         Do While Not EOF(1) ' Loop until end of file             linenumber = linenumber + 1             Line Input #1, line             arrayOfElements = Split(line, ';')              elementnumber = 0             For Each element In arrayOfElements                 elementnumber = elementnumber + 1                 Cells(linenumber, elementnumber).Value = element             Next         Loop     Close #1 ' Close file. End Sub 

    Got the inspiration from Shasur: http://vbadud.blogspot.com/2007/06/vba-read-text-files-with-leading.html

    I still do not know why Workbooks.OpenText does not work on my system even though it seems to work on user Remou‘s system. I guess it might have something to do with the operating system language (English) and the regional and language settings (German, Switzerland), but I am not sure.

    Anyway, the workaround works for me. Thank you all for you suggestions and help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 184k
  • Answers 184k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You may have figured this out already, but I've used… May 12, 2026 at 4:52 pm
  • Editorial Team
    Editorial Team added an answer Definitely go with SHFileOperation() as suggested above, CopyFile is way… May 12, 2026 at 4:52 pm
  • Editorial Team
    Editorial Team added an answer I'm assuming you're talking about a code structure something like… May 12, 2026 at 4:52 pm

Related Questions

How does one change the current directory in SQL Plus under windows. I am
If I have a Xaml Window, how does one open it as a child
Not too long ago, I had a problem which required me to set WinDbg.exe
How does one copy resource files (config/data/image) files to an applictions home directory on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.