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

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -