Looking with macro for a specific file which part name is in cell in specific path return all files in that path. In version 3.6.4 the same macro work just fine (it return only the file which was looking for)! Macro sample: "function cpy_impl(partName As String) As string Dim startPath as String dim xfil as string Dim FileX as String cpy_impl = "" startPath = "d:\My Documents\_scan\ZAH\" 'direktorij kjer se išče datoteko' ending = "*.pdf" '*.txt je privzeto za končnice txt' rem Xfil = (converttourl(startPath & (partName + ending))) Xfil = ((startPath & (partName + ending))) FileX = ( Dir (Xfil)) While (FileX <> "") cpy_impl = cpy_impl + FileX + ", " FileX = Dir Wend End function "
@Žajla: Please Attach a (Writer) document with Start button and complete working Macro in it so that tester only will have to modify the HDD path in the macro.
Created attachment 77469 [details] Macro in file not working as expected!
Well, that document only contains a Basic Function what does not work at all.
DIR function doesnot recognise wildcard characters!
Solved with version 4.0.4.2!