How to use Dir function in VBA?
The Dir function in VBA (Visual Basic for Applications) is used to return the name of a file, directory, or folder that matches a specified pattern or attributes. It is often used to loop through files or folders in a directory. The function can return one file name at a time, and it must be called repeatedly to get additional file names