Application.Message method (Project)

Displays a message in a message box.

Syntax

expression. Message( _Message_, _Type_, _YesText_, _NoText_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Message Required String The message to display in the dialog box.
Type Optional Long The buttons to include in the message dialog box. Can be one of the PjMessageType constants. The default value is pjOKOnly.
YesText Optional String The text to be displayed on the Yes button. The YesText argument is ignored unless Type is pjYesNo or pjYesNoCancel. The default value is "Yes".
NoText Optional String The text to be displayed on the No button. The NoText argument is ignored unless Type is pjYesNo or pjYesNoCancel. The default value is "No".

Return value

Boolean

Remarks

The Message method provides compatibility with the macro language used in Microsoft Project version 3. x. The MsgBox method in the VBA library should be used in new macros.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.