11 Replies Latest reply: Jul 31, 2014 5:22 PM by Layne Buck RSS

    Open all wokbooks from folder with macro

      Hello everybody! I have this macro in VB, but I want open all workbooks that are in this folder, but I dont know how will be the names of all workbooks. I tried this but it doesn't work..


      FUNCTION ConvertirFormatoArchivos()

        Dim  file, origen
        Set objExcel = CreateObject("Excel.Application")

        set file = CreateObject("Scripting.FileSystemObject")


               CurrentDirectory = path.GetAbsolutePathName(".")

               origen = CurrentDirectory & "\Bajadas\"  

               file  = origen & "*.xlsb"


                While (file <> "")



                     file = origen & "*.xlsb" 'Tomo todos los archivos binarios de la carpeta \Bajadas




      Thank you!!