一个工作簿中有几十个表,怎么能把每个表都弄成一个单独的工作簿。有没有快速解决的方法?

【解答】

Sub 另存所有工作表为工作簿()

Dim sht As Worksheet Application.ScreenUpdating = False ‘禁用屏幕刷新

ipath = ThisWorkbook.Path & “\” For Each sht In Sheets sht.Copy ActiveWorkbook.SaveAs ipath & sht.Name & “.xls” ‘(工作表名称为文件名)

‘ActiveWorkbook.SaveAs ipath & sht.Name & Trim(sht.[d15])& “.xls” ‘(工作表名称 & D15单元内容)

‘ActiveWorkbook.SaveAs ipath & Trim(sht.[d15]) & “.xls” ‘(文件名称为D15单元内容)

ActiveWorkbook.Close Next Application.ScreenUpdating = True ‘恢复屏幕刷新

End Sub