I was going to post shortened version and delete the commented .htmlBody line but got the Access error. Just uncomment the line above the short .htmlBody and delete the short version.
I was going to post shortened version and delete the commented .htmlBody line but got the Access error. Just uncomment the line above the short .htmlBody and delete the short version.
For those that want to try my method, here is a short test for the first file found part. See the commented thread for the aFFs() routine and supporting routine.
![]()
'2nd part #5, https://www.excelforum.com/excel-programming-vba-macros/1146991-invalid-procedure-call-or-argument-error.html Sub Test_aFirstFile() Dim p As String, a, fn As String p = "d:\myfiles\excel\test\" a = aFFs(p, , True) fn = aFirstFile(a, "Test.xls") MsgBox fn End Sub Function aFirstFile(arrayFullPaths, aFile As String) Dim f On Error Resume Next f = Filter(arrayFullPaths, "\" & aFile, True, vbTextCompare) aFirstFile = f(0) End Function
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks