View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Executor Executor is offline
external usenet poster
 
Posts: 74
Default Message Box in a macro

Hi Modell

Try this:

Assuming you used named ranges:

Sub myMacro
If IsEmpty(Range("Name") then
Range("Name").Select
MsgBox "A name must be entered", vbOkOnly, "Form not completed"
Exit Sub
End If
If IsEmpty(Range("ZIP") then
Range("ZIP").Select
MsgBox "A zipcode must be entered", vbOkOnly, "Form not
completed"
Exit Sub
End If
End Sub

HTH,

Executor.