I have a number of workbooks. Some may only contain 1 worksheet, some more. I want to programmatically merge all worksheets into the one, new, workbook.

I can sucessfully do this, when I know how many worksheets in each workbook and each worksheet name. However, I would prefer not to hardcode in the worksheet names. Can I write some code that wil figure out how many worksheets are contained in each workbook, and the worksheet name. Then loop through to merge all worksheets into the one workbooks?