Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the Name of the vbYesNo buttons

Status
Not open for further replies.

chris3366

Technical User
Mar 15, 2002
23
US
Would anybody know how to change the text of the buttons of a msgbox? I want a 2 choice set up. But I don't want just a yes or no. This is what I have now.

Dim strPrompt As String, strStyle As String, strTitle As String
Dim varPress As Variant
Dim varPress1 As Variant

strPrompt = "Is this Project Review Complete?"
strStyle = vbYesNo
strTitle = "Project Review"

varPress = MsgBox(strPrompt, strStyle, strTitle)

This works but I would prefer a more customize text.

This then gets passed through an "If/Then" based on choosing yes or no.

Any help is always appreciated.

Thanks.
 
I have seen some pretty involved windows API code to do this. Or you could simply spend five minutes and build a custom form.
 
I just wanted more than a yes or no. It isn't crucial or vital. Jut something to make the user be more careful which button they click. But we all know that will never happen.

Thanks Guys!!
 
There are a few more options built in

vbOKOnly 0 OK button only (default)
vbOKCancel 1 OK and Cancel buttons
vbAbortRetryIgnore 2 Abort, Retry, and Ignore buttons
vbYesNoCancel 3 Yes, No, and Cancel buttons
vbYesNo 4 Yes and No buttons
vbRetryCancel 5 Retry and Cancel buttons
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top