Dont allow blank

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
 
R

Ron de Bruin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top