msgbox/inputbox: Parameter description

The “msgbox” and “inputbox” features and their parameters.

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 30.05.2008
Machine translated
Updated: 30.12.2022 | Visual Basic Syntax Removed

msgbox

vtcapp.msgbox(text[, buttons][, title])

text

The text to be shown.

If only the text is specified, the message box contains the title “Information” and an OK button:

vtcapp.msgbox("Dies ist mein Text")

 

Long texts can be \n broken:

vtcapp.msgbox("Hier kommt \nder Zeilenumbruch")

buttons (optional)

Here the combination of buttons (OK, Cancel, etc.) and symbols (red X, yellow exclamation mark, etc.) that should be shown is defined. The indication is given by a number. If nothing is specified, the message box contains an OK button.

vtcapp.msgbox("Dies ist mein Text", 1)

The most commonly used buttons / icons are:

Value description
0 OK button.
1 OK and Cancel buttons.
3 Yes, No, and Cancel Buttons.
4 Yes and No Buttons.
16 Critical message: red X and an OK button.
48 Warning: yellow exclamation mark and an OK button.
64 Information: Blue i and an OK button

 

title (optional)

The title of the message box.

vtcapp.msgbox("Dies ist mein Text", 1, "Vertec")

If a title is specified, a button must also be specified.

If nothing is specified, the message box has the title “Information”.

Return Values

The message box returns the following values:

Value Clicked button
1 OK
2 Cancel
6 Yes
7 No.

 

inputbox

vtcapp.inputbox(title, text[, default])

title

The title of the input box. If you do not want the input box to have a title, specify an empty string.

text

The text to be shown.

vtcapp.inputbox("Vertec", "Wie lautet Ihr Name?")

If the text is multi-line, the individual rows can be \n be separated.

default (optional)

If you want to show text as the default response in the field, you can specify the value as the third parameter.

vtcapp.inputbox("Vertec", "Wie lautet Ihr Name?", "Hier Ihren Namen eingeben")

Return Values

When the user clicks OK (or presses Enter), the contents of the text box are returned.

When the user clicks Cancel, an empty string is returned.