View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default I need help on a Macro

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$F$12" And Target.Value = 35 Then
MsgBox "You need to restock", vbYesNo
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
hi guys
i really need to know how if i enter into cell F12 35 how can i get a
message box to appear with say "You need to restock" written on it and
the to buttons Yes and No?
Can anybody help me????????????????????????