Loop through excel files in a folder and open it without reference to filenames -
i want loop through excel files in folder , extract information. problem file names of excel files in vietnamese, when use dir function loop, not work. how can loop through files in folder , open them without referring names.
i try getfolder method doesn't seem work either.
thanks help.
sub loopthroughfiles() dim myobj object, mysource object, file variant dim wb workbook set mysource = myobj.getfolder("c:\excel") each file in mysource.files set wb = worksbooks.open(file) next file end sub
looks have dim myobj, don't initialize before used. should have set myobj = something
Comments
Post a Comment