ComboBox only shows 3 items on the list.

katydid56

New Member
Joined
Mar 18, 2017
Messages
13
Hello everyone,

I have a ComboBox named cboEmp1. It is in a frame on a UserForm. The list to use to populate the combo box is located in column A of the worksheet 'Reference'
Here is my code. (I don't think I entered it here correctly )

Private Sub PopulateEmployee()
With Worksheets("Reference")
Me.cboEmp1.List = .Cells(2, 1).Resize(.Cells(.Rows.Count, 2).End(xlUp).Row - 1, 1).Value
End With
End Sub

No matter how many entries are on the list only the first 3 show up in the ComboBox.
Any help is appreciated.

Thanks
katydid
 
Hi

Rich (BB code):
Private Sub PopulateDisposition()
With Worksheets("Reference")
Me.cboDisp.List = .Cells(2, 1).Resize(.Cells(.Rows.Count, 1).End(xlUp).Row - 1, 1).Value
End With
End Sub

From your original post, looks like you have changed the Column number to 3 - change it back to 1 as shown & see if resolves your issue

Dave
I changed the column number to 3 because this sub get the data from column C. The original post was for data from column A. The code for Column A is working with 38 rows of data. The other combo boxes wants to have lost of row when there is only 3 thing in the list?
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
in that case you should reference correct column in both places in your code

Rich (BB code):
Me.cboDisp.List = .Cells(2, 3).Resize(.Cells(.Rows.Count, 1).End(xlUp).Row - 1, 3).Value

Dave
 
Upvote 0
Solution

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top