Consulting

Results 1 to 3 of 3

Thread: Import CSV- error 53 file not found, How do I open a CSV ?

  1. #1

    Import CSV- error 53 file not found, How do I open a CSV ?

    Hello,

    I just started learning VBA, I am getting an error 53 when I am trying to import a CSV on my Mac.

    Could someone please kindly advice what I need to do to get it to import?

    Thank you so much in advance

    Sub opentextfile()
        Dim FilePath As String
        FilePath = "/Users/christinekelly/Desktop/authors.csv"
        Open FilePath For Input As #1
        row_number = 0
        Do Until EOF(1)
            Line Input #1, LineFromFile        
            LineItems = Split(LineFromFile, "", "")      
            ActiveCell.Offset(row_number, 0).Value = LineItems(2)   
            ActiveCell.Offset(row_number, 1).Value = LineItems(1)    
            ActiveCell.Offset(row_number, 2).Value = LineItems(0)
            row_number = row_number + 1   
        Loop
        Close #1
    End Sub
    Last edited by Aussiebear; 01-23-2025 at 01:37 PM.

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    623
    Location
    Removed by author.

  3. #3
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    623
    Location
    Removed by author.

Posting Permissions

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