userform combo box buggy

orsm6

Active Member
Joined
Oct 3, 2012
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Hi all - have recently built a userform containing combo boxes that i have turned into a drop down list.

the way it works is that on my sheet named 'lists' i have a named range. Then in the properties of the combo box i have typed the name of the named range in field RowSource.

the problem is that sometimes it will show me all of the contents of the named range and sometimes it wont.
I have extended the ListRow field to 30 and it still won't consistently work.

is there something I am missing or a better way to get my drop down list on the userform?

TIA
 

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
2,962
Office Version
  1. 365
Platform
  1. Windows
Please share the link here not via PM, so everyone can access it.
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,276
Office Version
  1. 2010
Platform
  1. Windows
sounds like you initialize both comboboxes in the userform_initialize sub. you need to dump all of the userform_initialize code into a new sub, then you can call the new sub from userform_initialize and from combobox1_change event, or as suggested, post the code so we can see what you are trying to do and mod what you have
 

orsm6

Active Member
Joined
Oct 3, 2012
Messages
379
Office Version
  1. 365
Platform
  1. Windows
sounds like you initialize both comboboxes in the userform_initialize sub. you need to dump all of the userform_initialize code into a new sub, then you can call the new sub from userform_initialize and from combobox1_change event, or as suggested, post the code so we can see what you are trying to do and mod what you have
I'll put up a link soon. The code I have works, but it needs to be a dynamic list. Currently the list doesn't change.
 

orsm6

Active Member
Joined
Oct 3, 2012
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Hi all i managed to get a work around on this. I am a bit fussy, so it isn't exactly what i wanted but, this code works enough.

Code:
Sub UserForm_Initialize()

'action drop down lists
ComboBox15.RowSource = "Lists!R1:R20"

end sub

i tried adding this line in ComboBox15.RowSource = "Lists!R1:R" & Range("R" & Rows.Count).End(xlUp).Row .... but it would only show the first item in the list range, not all of them
 

Watch MrExcel Video

Forum statistics

Threads
1,127,847
Messages
5,627,239
Members
416,232
Latest member
Ash1432

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