0 votes
in VBA by Beginner (2 points)
Does the list file path macro list file paths greater than 250 characters?

If not, is it possible to do this?

1 Answer

0 votes
by Super Expert (3.2k points)

The FSO macro to list files in a folder doesn't work for file paths beyond a certain length, but the macro in our tutorial on Looping through Files in a Folder with VBA allows it. Because it doesn't actually open the files so it ought to work for you. By default, it lists the files in the immediate window, but you can modify the code to list files in your Excel workbook by replacing

        Debug.Print file

with

        i = i + 1
        Range("A" & i) = strDir & file

 

Welcome to wellsr Q&A
Ask any questions you have about VBA and Python and our community will help answer them. wellsr Q&A is the standalone question and answer platform for wellsr.com. If you have a question about one of our specific tutorials, please include a link back to the tutorial.

Getting Started
Register
VBA Cheat Sheets (On Sale Now)

Looking for something else? Hire our team directly through ourVBA Help page, instead.

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.

...