EXCEL表格打印前希望做一下判断,比如A1>100时该表不能被打印,A1<=100时可以被打印,用VBA怎么写?

2024-12-16 00:46:10
推荐回答(1个)
回答1:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If A1 > 100 Then Exit Sub
End Sub