View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Cancel to take focus

MsgBox "Cancel has the focus", vbOKCancel + vbDefaultButton2, ""

RBS


"Pat" wrote in message
...
With the following example messagebox the Ok button by default takes the
focus. What do I need to add to allow the Cancel button to take the focus?

If IsEmpty(Cells(22, 11)) Then
MsgBox "Cancel has the focus"
Exit Sub
End If

Thank you if you can help out.
Pat