• Excel 2004 for Mac: Recurse Directory

    Author
    Topic
    #466296

    I am familiar with Windows Dir(oPath,”*.JPG) but am having difficulty with Excel 2004 for Mac.

    Excel 2004 does not use wildcards for Mac but utilizes the MacId of the file.

    Here is an example of the code I am using. My challenge is that not all JPG files are being listed and I am not sure why.

    strFileName = Dir(oPath, MacID(“JPEG”))

    While strFileName “”
    ActiveSheet.Range(“A2”).Offset(i, 0).Value = strFileName

    i = i + 1

    strFileName = (Dir)

    Wend

    Thanks for taking a look,
    John

    Viewing 1 reply thread
    Author
    Replies
    • #1207689

      Hmmm, since I don’t use a Mac we are going to have to hope an Excel using Mac user stops by.

    • #1207911

      I’ve tested it, and have the same problem (Snow Leopard and XL2004).
      I can’t see any reason for it, since the photos I was looking at were all taken on the same day with the same camera, so I can only suggest not using the second argument with Dir and just checking the extension instead.

    Viewing 1 reply thread
    Reply To: Excel 2004 for Mac: Recurse Directory

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: