Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox ListFill Range in Excel 2000

Status
Not open for further replies.

OzzieTheOwl

Technical User
Jun 26, 2006
61
GB
Hi

I have written the following vba in Excel 2000, to fill a ComboBox ListFillRange.

Code:
ActiveSheet.Shapes("ComboBox1").ControlFormat.ListFillRange = "Control!$B$2:$B$" & ControlEndB

I am getting the error message

Run-time Error '438'

Object doesn't support this property or method.

Can some enlighten me as to what I am doing wrong?

Cheers

Barney
 




Hi,

How to use the Watch Window as a Power Programming Tool faq707-4594

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
For Forms combobox:
...Shapes("ComboBox1").OLEFormat.Object.ListFillRange =...

For activex combobox (control toolbox):
....Shapes("ComboBox1").ControlFormat.ListFillRange =

combo
 
A typo above, should be OLEFormat for activex controls, ControlFormat for 'forms' controls.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top