What is the difference between ListFillRange and List, when using ComboBoxes?

Jamualson

Board Regular
Joined
Feb 17, 2021
Messages
145
Office Version
  1. 2019
Platform
  1. Windows
The following macro has the same output, however I can not use the 2 at the same so they throw error. (70, permission denied)

But seperately working well. Why are these 2 properties so similar and what is the different between then?

Thank you very much

Sub test()

With ComboBox1

.ListFillRange = "=Sheet2!B5:B10"
.List = Worksheets("Sheet2").Range("B5:B10")

End With

End Sub
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Using ListFillRange binds your control to a worksheet range. Using List you simply assign an array to the control - that array can be entirely in memory, or assigned from a range.

ListFillRange means that your control can use column headers, and will react automatically to changes in the source data, but it can also mean that your control events are triggered when you don't necessarily expect or want them to be - especially if you are using a dynamic range.
 
Upvote 0
Using ListFillRange binds your control to a worksheet range. Using List you simply assign an array to the control - that array can be entirely in memory, or assigned from a range.

ListFillRange means that your control can use column headers, and will react automatically to changes in the source data, but it can also mean that your control events are triggered when you don't necessarily expect or want them to be - especially if you are using a dynamic range.
thank you very much. I guess this is the cause for the error as well. If list is already set, then listfillrange can be set also, no problem, overwrites.

But if ListFillRange is set, and then i want to add a list to it, it shows an error.

Why error is showing only in 1 of the 2 situation? Thank you very much again for your help :)
 
Upvote 0
Just the way it was programmed I guess. Once ListFillRange is set, that effectively supplies the List property, so you can't use it.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

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