请问如何给窗体中的控件添加事件?窗体中有三个复选控件分别的宏程序在下面,只要单击确定即可运行复选的宏。
Sub 打印标签()
'
' 打印标签 Macro
'
'
Application.ActivePrinter = "\\ZZB04\Epson LQ-1600K 在 Ne06:"
ExecuteExcel4Macro _
"RINT(2,1,Cells(4,7),1,,,,,,,,2,""\\ZZB04\Epson LQ-1600K 在 Ne06:"",,TRUE,,FALSE)"
End Sub
Sub 打印备份标签()
'
' 打印备份标签 Macro
'
'
ActiveWindow.SelectedSheets.PrintOut From:=2661, To:=2665, Copies:=1
End Sub
Sub 打印工单()
'
' 打印工单 Macro
'
'
ActiveWindow.SelectedSheets.PrintOut Copies:=1
ActiveSheet.Unprotect Password:="locked"
Range("F3"Select
With Selection.Font
.Color = -16776961
End With
Range("C4:C6,E6:G6,C7:G7,I5:I6,H8,K88,O10:S28,P8"Select
Range("K8"Activate
Selection.ClearContents
Range("C4"Select
ActiveSheet.Protect Password:="locked", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End Sub |