Automatic printing

  • Thread starter Thread starter ghutchinson
  • Start date Start date
G

ghutchinson

Is it possible to use a macro to print out a worksheet when a cell in
that worksheet contains a specified number? I have a worsheet that
pulls info from another program and I want it to print when cell d6 is
at 10.
 
Try the following:

Right click on the worksheet TAB>View Code
then enter the following code

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("d6")) Is Nothing Then
If Range("d6") = 10 Then
ActiveSheet.PrintOut
End If
End If
End Sub



Paul
 
Back
Top