excel vba - save selected files in particular path -
i want open file dialog box allow me select multiple files. selected files should saved in particular path instead of opening. able open dailog box select files not sure how save in particular folder. please assist.
dim intchoice integer dim strpath string dim integer application.filedialog(msofiledialogopen).allowmultiselect = true intchoice = application.filedialog(msofiledialogopen).show if intchoice <> 0 = 1 application.filedialog(msofiledialogopen _ ).selecteditems.count strpath = application.filedialog(msofiledialogopen _ ).selecteditems(i) cells(i + 1, 1) = strpath next end if
something this. loop through files selected.
add tools pulldown select references, pick "microsoft scripting runtime".
dim fso new filesystemobject fso.copyfile selectedfile, targetfile
Comments
Post a Comment