Dir Function
Note Examples that follow demonstrate the use of this function in a Visual Basic for Applications (VBA) module. ... MyFile = Dir("C:\WINDOWS\WIN.INI") ' Returns filename with specified extension. If more than one *.ini ' file exists, the first fil...