' Returns a collection holding all the filenames that' match a given filespec and search attributes.Function GetFiles(filespec As String, Optional Attributes As VbFileAttribute) _ As Collection Dim filename As String Set GetFiles = New Collection ' start the search filename = Dir$(filespec, Attributes) Do While Len(filename) ' we've found a new file GetFiles.Add filename, filename ' get ready for the next iteration filename = Dir$ LoopEnd Function
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























