ComboBox.BoundColumn Property (Outlook Forms Script)

Gibt einen Variant-Wert zurück oder legt diesen Wert fest, der die Datenquelle in einem mehrspaltigen ComboBox -Steuerelement identifiziert. Lese-/Schreibzugriff.

Syntax

Ausdruck. Boundcolumn

expression Eine Variable, die ein ComboBox-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 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 Datenspalte, die in einem ComboBox-Objekt angezeigt wird. BoundColumn identifiziert die Spalte der zugeordneten Datenwerte, die für das Steuerelement gespeichert sind. Beispielsweise könnten Sie ein mehrspaltiges ComboBox-Steuerelement einrichten, das die Namen der Feiertage in einer Spalte und die Daten der Feiertage in einer zweiten Spalte enthält. Wenn den Benutzern die Namen der Feiertage angezeigt werden sollen, 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.