Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox list items
Can a Combobox list contain only one item? For instance,
Combobox.List = "List Item 1" or Combobox.List = Range(Cells(1,1),cells(1+Ivalue,1)).Value where Ivalue=0 sometimes I keep getting an error "List property cannot be set" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox list items
Combobox1.Value = "List Item 1"
-- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "joeeng" wrote in message ... Can a Combobox list contain only one item? For instance, Combobox.List = "List Item 1" or Combobox.List = Range(Cells(1,1),cells(1+Ivalue,1)).Value where Ivalue=0 sometimes I keep getting an error "List property cannot be set" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox list items
I actually want the list to have only one item at times and many items at
other times. "Bob Phillips" wrote: Combobox1.Value = "List Item 1" -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "joeeng" wrote in message ... Can a Combobox list contain only one item? For instance, Combobox.List = "List Item 1" or Combobox.List = Range(Cells(1,1),cells(1+Ivalue,1)).Value where Ivalue=0 sometimes I keep getting an error "List property cannot be set" |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox list items
Joe, try either looping through your range and using the .AddItem method or
set the .RowSource of the combobox to your range. For example: Dim rCell as Range Dim r as Range Set r = Range("A1:A10") For Each r in rCell.Cells ComboBox1.AddItem r Next or more simply: Dim r as Range Set r = Range("A1:A10") ComboBox1.RowSource = r.Address -- Charles Chickering "A good example is twice the value of good advice." "joeeng" wrote: I actually want the list to have only one item at times and many items at other times. "Bob Phillips" wrote: Combobox1.Value = "List Item 1" -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "joeeng" wrote in message ... Can a Combobox list contain only one item? For instance, Combobox.List = "List Item 1" or Combobox.List = Range(Cells(1,1),cells(1+Ivalue,1)).Value where Ivalue=0 sometimes I keep getting an error "List property cannot be set" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combobox items determined by the selection in another combobox | Excel Programming | |||
Using a combobox to eliminate items from a list | Excel Programming | |||
formatting the list items for ComboBox created using Forms | Excel Discussion (Misc queries) | |||
named range, data validation: list non-selected items, and new added items | Excel Discussion (Misc queries) | |||
missing items in sheet's activex list/combobox after resizing range | Excel Programming |