Cancel to take focus

  • Thread starter Thread starter Pat
  • Start date Start date
P

Pat

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
 

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

Back
Top