2

Google と MSDN を調べましたが、xlcAlert に関するドキュメントが見つかりません。たまたま xlcAlert を使用しているコードしか見つかりませんが、次の 2 つの形式があります。

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

xlStr には、警告ボックスに表示するメッセージが含まれています。しかし、xlInt は何のためにあるのでしょうか。オプションのようです。xlInt の値に 2 または 3 を使用するコードを見たことがありますが、それが何を行うのか、またはそのパラメーターに対して可能な有効な値は何なのかについての説明はありません。

では、xlInt は何のためにあり、どのような値が考えられるのでしょうか?

4

1 に答える 1

1

http://support.microsoft.com/kb/128185から

Syntax

ALERT(message_text, type_num, help_ref) Message_text は、ダイアログ ボックスに表示されるメッセージです。Type_num は、表示するダイアログ ボックスの種類を指定する 1 ~ 3 の数値です。type_num を省略すると、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.

于 2012-05-28T16:40:36.497 に答える