ActiveX combobox listfill range.

Kosie123

New Member
Joined
Jul 16, 2018
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi everybody.
I have an activex combobox filled with a dynamically named range. Rhe listfill range in the combobox has the range name in it. If I add values to the bottom of the range it does not show in the activexcombobox drop down, unless I retype the same name again in the listfill range box?? If I save the sheet nothing happens but if i save and close and reopen the sheet the added values at the bottom of the list is there? Thanks a lot.
 

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.
Please post the code that you are using to populate the ComboBox
Remember to click on </> icon above post window
- paste your code into the window which appears, amend Language to VBA Code, and click Continue
 
Upvote 0
No VBA code. The dynamically named range (=OFFSET(Sheet1!$B$1,1,0,COUNTA(Sheet1!$B:$B),1). Named "gert". gert went into the act.x combo box ListfillRange box. If I add more vaues, it doesn't show in the dropdown. if I retype "gert" in the listfillRange box then the list shows the extra values. If I close the book and reopen it, then the extra values are updated! Curious? Seems like something the Excel clever guys must look at. I subsequently discovered that this question has been asked before elsewhere but I saw no solutions. Regards.
 
Upvote 0
Have you tried recalculating the workbook?

That should update the formula used in the named range.
 
Upvote 0
Code below automatically forces named range to recalculate when combobox made active

Place in SHEET module (of the sheet containing the combobox)
- right-click on sheet tab\ View Code \ paste code into the open window\ {back to Excel with ALT}{F11}
- amend ComboBox1 (both in the name of the procedure and in the line of code) if required

VBA Code:
Private Sub ComboBox1_GotFocus()
    ComboBox1.ListFillRange = "gert"
End Sub
 
Upvote 0
Hi Norie
Recalculating didn't work.
Hi Yongle
I stuck the macro in the sheet module. It works.
Thankyou all!
Lets call that Solved!
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

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