下面的代码是导入指定工作薄的所有工作表Sub 导入()drfile = InputBox("请输入要导入的excel文件名(不包含扩展名):", "输入")drfile = drfile & ".xls"Workbooks.Open ThisWorkbook.Path & "" & drfiledrcount = Workbooks(drfile).Sheets.CountFor i = 1 To drcountWith Workbooks(drfile).Sheets(i).Copy after:=ThisWorkbook.Sheets(Sheets.Count)End WithNextWorkbooks(drfile).Close FalseEnd Sub