本帖最后由 zjdh 于 2014-2-26 16:31 编辑
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 11 Then Exit Sub
Sheet4.Unprotect "1"
Cells.Locked = False
Range("a1", Target).Locked = True
Sheet4.Protect "1"
i = Target.Row
If MsgBox("你确定要打印吗?", 1) = 1 Then
With Sheet5
.[a2] = "*" & Cells(i, 1) & "*"
.[a3] = Cells(i, 1)
.[b4] = Cells(i, 2)
.[b5] = Cells(i, 4)
.[b6] = Cells(i, 7)
.[d6] = Cells(i, 9)
.PrintOut Copies:=Target.Value
End With
Else
MsgBox "你放弃了打印!"
End If
End Sub