那代码就不应该写Sheets(1),而是ActiveSheet,并且判断是否相等,例如:
Private Sub Workbook_BeforePrint(Cancel As Boolean)Application.DisplayAlerts = False
if ActiveSheet.Name=Sheets(1).Name Then
Sheets(1).Copy
.....
End if
那代码就不应该写Sheets(1),而是ActiveSheet,并且判断是否相等,例如:
Private Sub Workbook_BeforePrint(Cancel As Boolean)Application.DisplayAlerts = False
if ActiveSheet.Name=Sheets(1).Name Then
Sheets(1).Copy
.....
End if