Share via

Excel 2010 ListBox selection type problem

Anonymous
2012-03-08T05:50:49+00:00

I have Excel 2010 installed on my laptop. In one whorksheet, I added one listbox(form control) and have several items in it, I set the 'selection type' to 'Extend', I do can select multiple items by pressing SHIFT and mouse, but I can not select multiple items while I press CTRL and mouse, when I did this, it's like when I Right clicking the listbox. My home computer also installed office 2010 but do not have this problem.

Anybody knows why this happening? Thanks a lot!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-03-12T02:23:11+00:00

Hi,

If you really want to use CTRL, the ListBox for ActiveX Control can meet your needs.

How to add a ListBox (ActiveX Control)?

Click the Developer tab >> Insert >> ListBox (ActiveX Control)

If you can not see the Developer tab, please do the following steps first:

Right-click the ribbon >> Customize the Ribbon >> check Developer

How to add a column data to the added ListBox?

e.g, there are four data rows in column A:

──

 A

──

 5

 8

 6

 3

──

Press [Alt+F11] to open the VBE Environment, and then paste the following code to a Module (Insert >> Module):

Sub AddRangeData2ListBox()

    Dim arrList

    arrList = Range("A1:A4")

    ListBox1.List = arrList

End Sub

{5, 8, 6, 3} will add to the ListBox after you run the macro above.

How to set the selection type of the added ListBox?

Go back to Sheet1, click the Developer tab >> Design Mode >> Properties >> select the added ListBox >> MultiSelect >> 2 - fmMultiSelectExtended >> Design Mode

Note:

In this way, every time you open the Excel document, the list is empty, to keep the original data, you should add the Workbook_Open event in ThisWorkbook like below:

Private Sub Workbook_Open()

    AddRangeData2ListBox

End Sub

Best regards,

Cristin

Was this answer helpful?

0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-03-09T07:58:26+00:00

    Hi Cristin,

    Now I'm using the "Multi" type, it does work, but the thing is; I might have selected several items before I close the spreadsheet, when I reopen it, I might just want to select some items which are not the same as what I have selected, then I have to unselect those first and then select what I really want.

    Anyway, if there is no way for using CTRL, I have to accept type 'Multi', thanks a lot.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-03-09T07:44:41+00:00

    Hi,

    Please change the selection type of ListBox to "Multi".

    Cheers,

    Cristin

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-03-09T07:32:47+00:00

    Hi ,

    Thank you for your advice, but what if I just want to select item 1, 3 and 5? I don't want to select item 2 and 4.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-03-09T05:25:38+00:00

    Hi,

    Select multiple items by pressing CTRL and mouse means that just select the listbox control.

    I think of a way to work around this problem:

    Select multiple items by dragging the mouse up or down instead of pressing CTRL.

    Cheers,

    Cristin

    Was this answer helpful?

    0 comments No comments