hi,
without opening the workbook with the worksheet u need data from, try this:
path = [path where the file is located] (with \ at the end)
filename= [workbook where data has to be collected]
sheetname = [sheet from worbook with data]
'
string = "'" & path & "[" & filename & "]" & sheetname & "'!" & "r" & i & "c" & j
(i represents the row, j represents the column)
value = ExecuteExcel4Macro(string)
put this piece of code in a loop and you're done
|