Share via


ListBox.BoundColumn Property (Outlook Forms Script)

Dient zum Zurückgeben oder Festlegen eines Werts vom Typ Variant, der die Datenquelle in einem mehrspaltigen ListBox -Objekt angibt. Lese-/Schreibzugriff.

Syntax

Ausdruck. Boundcolumn

Ausdruck Eine Variable, die ein ListBox-Objekt darstellt.

HinwBemerkungeneise

The possible values of BoundColumn are 0 and 1. 0 assigns the value of the ListIndex property to the control. 1 assigns the value from the specified column to the control. Columns are numbered from 1 when using this property (default).

When the user chooses a row in a multicolumn ListBox or ComboBox, the BoundColumn property identifies which item from that row to store as the value of the control. For example, if each row contains 8 items and BoundColumn is 3, the system stores the information in the third column of the currently-selected row as the value of the object.

Mithilfe der Eigenschaften BoundColumn und TextColumn können Sie benutzern einen Satz von Daten anzeigen, aber unterschiedliche, zugeordnete Werte für das Objekt speichern. TextColumn identifiziert die Spalte der Daten, die in einem ComboBox- oder ListBox-Objekt angezeigt werden. BoundColumn identifiziert die Spalte der zugeordneten Datenwerte, die für das Steuerelement gespeichert sind. Sie können beispielsweise ein mehrspaltiges ListBox-Objekt einrichten, das die Namen von Feiertagen in der einen Spalte und die Daten der Feiertage in einer zweiten Spalte enthält. Damit die Namen der Feiertage Benutzern angezeigt werden, geben Sie die erste Spalte als TextColumn an. Zum Speichern der Daten dieser Feiertage geben Sie die zweite Spalte als BoundColumn an.

The ListIndex value retrieves the number of the selected row. For example, if you want to know the row of the selected item, set BoundColumn to 0 to assign the number of the selected row as the value of the control. Be sure to retrieve a current value, rather than relying on a previously saved value, if you are referencing a list whose contents might change.

The Column, List, and ListIndex properties all use zero-based numbering. That is, the value of the first item (column or row) is zero; the value of the second item is one, and so on. This means that if BoundColumn is set to 3, you could access the value stored in that column using the expression Column(2).

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.