Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSV format problem (2000 (9.0.4402 SR-1))

    I have a problem when opening a csv file from Excel VBA. In the file is a currency field which I need to extract and summarise. When opening from VBA this field seems to be depicted as a text field and will not summarise. If, however, I open this file from Excel itself, or by double clicking it from it's folder location, the field is depicted as being a currency field and thus can be summarised.

    Can anyone tell me what is happening here, please? I have attached the file in question and the VBA code used to open is simply "Application.Workbooks.Open "u:dhafi000029.csv""

    Cheers,

    Niven

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CSV format problem (2000 (9.0.4402 SR-1))

    VBA is very US-centric. It doesn't know that there are other currencies than $. So a value beginning with

  3. #3
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CSV format problem (2000 (9.0.4402 SR-1))

    Hi Hans,

    Haven't said thanks to previous solutions you have given me re Access so will take the opportunity now.

    Regret the Local:=True isn't working for me as Excel is returning "Compile error: Named argument not found"

    Should have guessed that this would be another US-centric anomaly!

    Cheers,

    Niven

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CSV format problem (2000 (9.0.4402 SR-1))

    Sorry. Apparently Local was added in Excel 2002 (which I'm using).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •