Userform Combobox Rowsource not populating

jollie

New Member
Joined
Mar 9, 2011
Messages
5
Hi,

I'm a basic VBA user needing help. I have just upgraded to MS Excel 2010 and some Userforms from 2003 are now not working.

When I open the Userform, the Combobox is not populated with the Rowsource. It used to work fine!

The Rowsource property is just the Named Range that is in the worksheet. This is not down through code, just the properties window.

Is there a reason it would no longer be working?

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,730
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
How is the named range defined? Is it a static address, or dynamic?
 

jollie

New Member
Joined
Mar 9, 2011
Messages
5
The named ranges are dynamic in that a macro runs before the userform is initialised to create the ranges: its some very old code:

Code:
<CODE>
 
Worksheets("Customer List").Select
 
Range("A2").Select
 
While ActiveCell <> ""
ActiveCell.Offset(1, 0).Select
Wend
 
ActiveCell.Select
 
rwnb = ActiveCell.Row
Range("A2", Cells(rwnb, 1)).Name = "Customer_List"
<CODE>

There is no code in the Userform Combobox to add Customer_List as the Rowsource. It is simply defined in the properties window as being Customer_List.

Userform is called Start_CustStatement
Combobox is called CustomerBox

Thanks for your help, much appreciated.
</CODE></CODE>
 
Last edited:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,730
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
I can't see anything immediately wrong with that - have you checked in Name Manager to see if the ranges are defined correctly?
 

jollie

New Member
Joined
Mar 9, 2011
Messages
5

ADVERTISEMENT

Hi,

I checked in name manager and they seem to be defined correctly.

Name Customer_List
Refers to ='Customer List'$A$2:$A$142
Scope Customer List

Is is becayse the scope is for the worksheet only? The macro is not run from this worksheet.

There are no other ranges by that name in the workbook.

Still stumped.

Thanks,
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,730
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
That's odd because your code should be creating a name scoped to the workbook. What happens if you delete the name and then run the code again?
 

jollie

New Member
Joined
Mar 9, 2011
Messages
5

ADVERTISEMENT

Wait, I found something! The combobox WAS populated with the list (stupid me), but in the code I force it to show ""

Code:
Sub Call_Start_CustStatement()
Call Create_Customer_List
Application.ScreenUpdating = False
    Start_CustStatement.CustNoBox.Value = ""
    Start_CustStatement.CustomerBox.Value = ""
    Start_CustStatement.BusinessBox.Value = ""
    Start_CustStatement.Show
End Sub

What the problem is, is that the drop down arrow is not working to show me the list below the combo box. If I make an entry in the box, I can move up and down the list with arrow keys - but I had been checking with the down arrow to see that the list is there before making any entries. The drop down arrow is not working to show a scroll list under the combobox to choose an entry from.

Surely this is something much more simple I need to fix in the properties window so that the drop down arrow will show the list (I have ListRows set to 8 normally)?

Thanks for your help.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,730
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
So you click the dropdown arrow and nothing happens at all?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,730
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
I don't think I've ever seen that before.
Any chance you could post the workbook somewhere for inspection?
 

Watch MrExcel Video

Forum statistics

Threads
1,130,112
Messages
5,640,174
Members
417,130
Latest member
Darion2021

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
Top