Share via


UI2.Confirm method

Displays a message box with buttons for input from a user.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Function Confirm ( _
    bstrPrompt As String, _
    lButtons As XdConfirmButtons _
) As XdConfirmChoice
'Usage
Dim instance As UI2
Dim bstrPrompt As String
Dim lButtons As XdConfirmButtons
Dim returnValue As XdConfirmChoice

returnValue = instance.Confirm(bstrPrompt, _
    lButtons)
XdConfirmChoice Confirm(
    string bstrPrompt,
    XdConfirmButtons lButtons
)

Parameters

  • bstrPrompt
    Type: System.String

    The text message to be displayed.

Return value

Type: Microsoft.Office.Interop.InfoPath.XdConfirmChoice
An XdConfirmChoice enumeration.

Examples

In the following example, the Confirm method of the UIObject object is used to display a dialog box with Yes and No buttons:

thisXDocument.UI.Confirm("Do you wish to continue?", XdConfirmButtons.xdYesNo);

See also

Reference

UI2 interface

UI2 members

Microsoft.Office.Interop.InfoPath namespace