Right on. Learning is always a plus :]
This is the context im using this code in. Is that what you mean by reference?
This searches a directory, finds the xls files, imports them into seperate tables, and names them respective to the workbook names. FileNameNoPathNoExtension is the only custome function.
With Application.FileSearch
.LookIn = MyFolder 'directory path
.FileName = "*.xls" 'I only want .xls files
.Execute
If .FoundFiles.Count > 0 Then
For i = 1 To .FoundFiles.Count
fName = FileNameNoPathNoExtension(.FoundFiles(i)) 'Custom function returning file name without path/extension
DoCmd.TransferSpreadsheet acImport, acSpreadsheet TypeExcel8, fName, .Foundfiles(i), True
Next i