Controlling focus on command button

  • Thread starter Thread starter TESA0_4
  • Start date Start date
T

TESA0_4

Hi,
The following code is being used to open a dialog box:

Answer = MsgBox("Are you sure you want to delete this Task Step?",
vbQuestion + vbYesNo, "Question")

When the dialog box opens the focus is on the 'Yes' button. Is there a means
of making the focus fall on the 'No' button when the dialog box opens?

Thank you in anticipation of any suggestions!
 
TESA0_4 said:
Hi,
The following code is being used to open a dialog box:

Answer = MsgBox("Are you sure you want to delete this Task Step?",
vbQuestion + vbYesNo, "Question")

When the dialog box opens the focus is on the 'Yes' button. Is there a
means
of making the focus fall on the 'No' button when the dialog box opens?

Thank you in anticipation of any suggestions!


Answer = MsgBox( _
"Are you sure you want to delete this Task Step?", _
vbQuestion + vbYesNo + vbDefaultButton2, _
"Question")
 
TESA0_4 said:
Hi,
The following code is being used to open a dialog box:

Answer = MsgBox("Are you sure you want to delete this Task Step?",
vbQuestion + vbYesNo, "Question")

When the dialog box opens the focus is on the 'Yes' button. Is there a
means
of making the focus fall on the 'No' button when the dialog box opens?

Thank you in anticipation of any suggestions!

vbQuestion + vbYesNo + vbDefaultButton2
 
Thank you Dirk and thank you Stuart.


Dirk Goldgar said:
Answer = MsgBox( _
"Are you sure you want to delete this Task Step?", _
vbQuestion + vbYesNo + vbDefaultButton2, _
"Question")


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top