Sub Macro2() Dim myStr As String myStr = ActiveSheet.PageSetup.PrintArea If myStr = "" Then MsgBox "未设置打印区域,默认为整个工作表!", vbInformation Cells.Select Else Range(myStr).Select End If Selection.Copy Workbooks.Add ActiveSheet.Paste Application.CutCopyMode = False ActiveSheet.Name = "PrintAreaCopy" ActiveWorkbook.SaveAs Filename:="D:\Book00.xls" End Sub