Dont allow blank

  • Thread starter Thread starter nowfal
  • Start date Start date
N

nowfal

Hi,
Ron, again some Ambiguous name detected message comes, here i a
showing the first code which is intersecting. Which is in cell C2.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C2:C2")) Is Nothing Then Exit Sub
If Range("C2:C2") > 0 Then CUSTOMER
End Sub

Is it possible to give some name change for the work_sheet change.

Regards
nowfa
 
Use this instead

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("C2"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 0 Then
MsgBox "Run the CUSTOMER macro"
End If
End If
End Sub
 
Back
Top