It appears you are expecting the macro to guess what workbook the sheets are
in. It will only guess the workbook in which the code is running.
You will need to make the name of the workbook which does not contain the
code one of the calling parameters. You may also need to pass the names of
the worksheets as strings rather than as objects. Then use
workbook.sheets(sheetname) to address each worksheet.