View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Juan Pablo González Juan Pablo González is offline
external usenet poster
 
Posts: 226
Default code doesnt work

Is that in the 'Sale' sheet code module ? and also, change this line

If Target.Address = "sale!$P$2" Then

to this

If Target.Address = "$P$2" Then

--
Regards,

Juan Pablo González

"Choice" wrote in message
...
Still not working, this is exactly what i have in there. when i go to

Sale!P2...type in a number nothing happens

Private Sub Worksheet_Change(ByVal Target As Range)
Dim ans
If Target.Address = "sale!$P$2" Then
If WorksheetFunction.CountIf(Range("Tracking!C4:C100" ),

Range("Sale!P2")) 0 Then

ans = MsgBox("Continue", vbYesNo)
If ans = vbYes Then Application.Run (SortTracker)
End If
End If

End Sub