Async Property

Microsoft Office Web Components Visual Basic

Async Property

Indicates whether the binding of the XMLDataBinding object is asynchronous or not. Read-only.

expression.Async

expression    Required. An expression that returns an XmlDataBinding object.

Remarks

You can use the Async property of the XmlDataBinding object to find out if a binding supports asynchronous binding. It returns True if the binding is asynchronous, otherwise it returns False. The default value is False.

It only affects the behavior of Query bindings. When the value is True, on page load, the Spreadsheet component will render along with any static data before the LoadMode=Normal bindings actually occurs. While asynchronous bindings are in progress, the Spreadsheet component will be non-interactive (same as ViewOnly mode). Once the binding is done and the events have occured, the user interface will become interactive.

When the value is False, the page will not render until bindings where LoadMode=Normal have completed loading. Subsequent refresh operations with user interface commands or with calls to the Refresh method will not respond until binding operations have completed.

When an asynchronous binding is in progress, any attempt to work with an XmlDataBinding object programmatically will fail.

Example

The following VBScript example checks if the binding state of the first XMLDataBinding object in the XMLDataBindings collection is asynchronous. If it is, a message box is displayed.

    Sub Async()

    Dim objBinding
    Set objBinding = Spreadsheet1.ActiveWorkbook.XmlDataBindings.Item(1)

    ' Check to see if the binding is asynchronous.
    If objBinding.Async = True Then

        ' Alert the user if the binding state is asynchronous.
        MsgBox ("The binding is asynchronous.")

    End If

End Sub