I got:
Error: 1429
LineNo: 151
Message: OLE IDispatch exception code 0 from Microsoft Office Excel: Cannot rename a sheet to the same name as another sheet, a referenced object library or a workbook referenced by Visual Basic...
Procedure: combineexcelfiles
Details: OLE IDispatch exception code 0 from Microsoft Office Excel: Cannot rename a sheet to the same name as another sheet, a referenced object library or a workbook referenced by Visual Basic..
StackLevel: 2
LineContents: .WorkBooks(1).ActiveSheet.name = right(alltrim(chrtran(m.lcWorkSheetCaption, chrtran(m.lcWorkSheetCaption,m.lcValidChars,"")," ")), 31) &&loWorkBook.Name
I think it's a problem on my end in naming these files...
If it's not broken, fix it until it is.
My Blog