VBA之"禁止列印某個工作表"
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Sheet1" Then
Cancel = True
MsgBox "取消列印"
Else
Cancel = False
End If
End Sub收起
VBA之"禁止列印某個工作表"
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Sheet1" Then
Cancel = True
MsgBox "取消列印"
Else
Cancel = False
End If
End Sub收起