开发者

With xlcAlert, what's the last parameter for?

I've looked aroun开发者_C百科d on Google and MSDN, and I can't find any documentation on xlcAlert. All I can find is code that happens to use xlcAlert, but it comes in two forms:

Excel4(xlcAlert, NULL, 1, &xlStr);
Excel4(xlcAlert, NULL, 2, &xlStr, &xlInt);

xlStr contains the message to display in the alert box. But what's the xlInt for? It appears to be optional. I've seen code that uses 2 or 3 for the value of xlInt, but no explanation of what it does, or what the possible valid values are for that parameter.

So what is xlInt for, and what possible values are there?


From http://support.microsoft.com/kb/128185

Syntax

ALERT(message_text, type_num, help_ref) Message_text is the message displayed in the dialog box. Type_num is a number from 1 to 3 specifying which type of dialog box to display. If you omit type_num, it is assumed to be 2.

If type_num is 1, ALERT displays a dialog box containing the OK and Cancel buttons. Choose a button to continue or cancel an action. ALERT returns TRUE if you choose the OK button and FALSE if you choose the Cancel button. See the last example below. If type_num is 2 or 3, ALERT displays a dialog box containing an OK button. Choose the button to continue, and ALERT returns TRUE. The only difference between specifying 2 or 3 is that ALERT displays a different icon on the left side of the dialog box as shown in the examples below. So, for example, you could use 2 for notes or to present general information, and 3 for errors or warnings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜