XL97: Cannot Use Mouse to Populate RowSource or ListFillRange

ID: Q161072

The information in this article applies to:

SYMPTOMS

When you use the pointer to select a cell range to populate the RowSource or the ListFillRange property for an ActiveX control, nothing appears in the box for either property.

CAUSE

You cannot use the pointer to populate cell range references in the Properties window for any ActiveX control.

RESOLUTION

To enter a range reference in the Properties window, manually type the reference. For example, if you want to set the RowSource property for a combo box to the range A1:A5 on Sheet1, type the following for the RowSource property:

   Sheet1!A1:A5

STATUS

This behavior is by design of Microsoft Excel.

MORE INFORMATION

Specifying a range reference for a control on a UserForm or a worksheet, is called data binding. List boxes and combo boxes are controls that support data binding; however, the properties you set for referencing a cell range vary according to whether the control is on a worksheet or on a UserForm.

The following table lists the properties you can set for a combo box or a list box on a worksheet.

   Property        Function
   -----------------------------------------------------------------------
   ListFillRange   Specifies the source range that provides the list for
                   the control.

   LinkedCell      Identifies a cell linked to the control's value. When
                   you type a value in the linked cell, the control uses
                   this value (and vice versa). The linked cell returns an
                   #N/A error value if it is linked to a multiselect list
                   box.

The following table lists the properties you can set for a combo box or a list box on a UserForm.

   Property        Function
   ---------------------------------------------------------------------
   RowSource       Specifies the source range that provides the list for
                   the control.

   ControlSource   Identifies a cell linked to the control's value. When
                   you type a value in the linked cell, the control uses
                   this value (and vice versa).

NOTE: The following two properties support data binding, but the location of the control (worksheet or UserForm) is not a factor in how the properties behave.

   Property      Function
   ---------------------------------------------------------------------
   BoundColumn   Identifies the column of data you want to retrieve when
                 you use a multicolumn list box or combo box. For
                 example, if the list box contains four columns of data,
                 and you set the BoundColumn property to 3, the value
                 from the third column is returned to the cell that is
                 linked to the control.
                    
                 If you set the BoundColumn property to a value of zero
                 (0), the cell linked to the control displays the index
                 value of the item selected from the list.

   TextColumn    Identifies the column of data to return to the Text
                 property of the control when you use a multicolumn list
                 box or combo box. The value of the Text property is not
                 written in the cell that is linked to the control.

REFERENCES

For more information about ActiveX controls, click the Index tab in Microsoft Excel Help, type the following text

   activex

and then double-click the selected text to go to the "About adding buttons, check boxes, and other controls" topic.

Additional query words: 97 for Windows XL97 list box combo drop down drop-down

Keywords          : kbprg kbtool kbdta xlui KbVBA 
Version           : WINDOWS:97
Platform          : WINDOWS

Last Reviewed: December 9, 1998