Application.Caption Property
Project Developer Reference |
Returns or sets the text in the title bar of the main window. Read/write String.
Syntax
expression.Caption
expression A variable that represents an Application object.
Return Value
String
Remarks
When the active window is maximized, the title bar displays the caption for both the main and active windows, separating the captions with a hyphen. For example, if the caption for the main window is "Microsoft Office Project" and the caption for the active window is "Project1", the title bar displays "Microsoft Office Project - Project1" when the active window is maximized.
If you set the Caption property to Empty, the title bar displays a default caption. The default caption for the main window is "Microsoft Office Project".
In a project with one window, the default caption for the window is the file name of the project. In a project with multiple windows, the default caption for each window is name:n, where name is the file name of the project and n is a unique number for the window. For example, if the second window of the project "Project1" is active, the default title bar displays "Microsoft Office Project - Project1.mpp:2"
Example
The following example prompts the user to change the caption for the active window.
Visual Basic for Applications |
---|
|
See Also