I'd use
sub M_snb() sn=filter(split(createobject("wscript.shell").exec("cmd /c dir ""G:\OF\*.xls*"" /b/s"),vbcrlf),":") for j=0 to ubound(sn() with getobject(sn(j)) sp=.sheets(1).usedrange .close 0 end with thisworkbook.sheet1.cells(rows.count,1).end(xlup).offset(1).resize(ubound(sp),ubound(sp,2))=sp next End sub