I have the following macro in my worksheet module;
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim TestRange As Range
Set TestRange = Range("$H$2:$H$500")
If Not Intersect(Target, TestRange) Is Nothing Then
If Target.Value = "Yes" Then
Target.EntireRow.PrintOut Copies:=2
End If
End If
Set TestRange = Nothing
End Sub
Instead of looking at the target value, as the user will be entering yes then leaving the cell, I wish to have the macro look at the value of the cell it is leaving.
If anyone can help me out, I would greatly appreciate it.
Thnx
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim TestRange As Range
Set TestRange = Range("$H$2:$H$500")
If Not Intersect(Target, TestRange) Is Nothing Then
If Target.Value = "Yes" Then
Target.EntireRow.PrintOut Copies:=2
End If
End If
Set TestRange = Nothing
End Sub
Instead of looking at the target value, as the user will be entering yes then leaving the cell, I wish to have the macro look at the value of the cell it is leaving.
If anyone can help me out, I would greatly appreciate it.
Thnx