Retrieve data from multiple excel file by using file path in the cell value -
i have excel file , wish auto retrieve data clicking button.
i have stored file path in b11 b13.
my code below:
sub fetchdata() dim wbsource workbook dim shsource worksheet dim shdestin worksheet application.screenupdating = false workbooks.open filename:="c:\users\corporate quality\desktop\test\new microsoft excel worksheet" & sheets("sheet1").range("b3") set wbsource = activeworkbook set shsource = wbsource.sheets("sheet1") set shdestin = thisworkbook.sheets("sheet1") shdestin.range("e11") = shsource.range("a2") wbsource.close false end sub
is there possible change workbooks.open filename:= "c:\users\corporate quality\desktop\test\new microsoft excel worksheet"
b11:b13 ?
i don't know what's in b11:b13 can concatenate values in same way doing b3. example,
filename := range("b11").value & range("b12").value & range("b13").value
Comments
Post a Comment