excel - Issue in Running imported Macros in VBA -
i want import macro files specified location in workbooks in specified folders , want run macros on each workbook, able import in workbooks through code mentioned below can not able run macros. sub recursivefolders() dim filesys object dim objfolder object dim objsubfolder object dim objfile1 scripting.file dim wkbopen workbook dim szimportpath string dim objfso scripting.filesystemobject dim cmpcomponents vbide.vbcomponents set objfso = new scripting.filesystemobject set filesys = createobject("scripting.filesystemobject") set objfolder = filesys.getfolder("c:\users\yashika vaish\desktop\testform") application.screenupdating = false each objsubfolder in objfolder.subfolders each objfile in objsubfolder.files set wkbopen = workbooks.open(filename:=objfile) szimportpath = folderwithvbaprojectfiles & "c:\macros" set cmpcomponents = wkbopen.vbproject.