ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   message box text (https://www.excelbanter.com/excel-worksheet-functions/126553-message-box-text.html)

sako 338

message box text
 
is it possible to change the "OK" text in a message box. the message box does
what i need, but i want to alter the text from "OK" to a word of my choice

John Bundy

message box text
 
The best thing to do is create a userform and put your own button on and
userform.show when you need it
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"sako 338" wrote:

is it possible to change the "OK" text in a message box. the message box does
what i need, but i want to alter the text from "OK" to a word of my choice


Martin Fishlock

message box text
 
Hi Sako,

You cannot set custom text on buttons to a msgbox command.

You have the option of the following button combinations:

OK button only.
OK and Cancel buttons.
Abort, Retry, and Ignore buttons.
Yes, No, and Cancel buttons.
Yes and No buttons.
Retry and Cancel buttons.

Using the various constants (see help).

The solution is to try and form your question to match the buttons.

Instead of 'Which language would you like to use?' and have two buttons
'English' and 'Thai'. Have 'Would you like to switch the language from
English to Thai? and use 'Yes' and 'No' with vbYesNo constant.

The other solution is to wirte VBA that emulates the msgbox function.

This way you can set the text to the captions by passing parameters to the
function.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"sako 338" wrote:

is it possible to change the "OK" text in a message box. the message box does
what i need, but i want to alter the text from "OK" to a word of my choice



All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com