Re: Can't populate combobox list with 1 item
From: Frank Kabel (frank.kabel_at_freenet.de)
Date: 08/11/04
- Next message: sebastienm: "RE: Efficient Code For Writing An Array To A Worksheet"
- Previous message: Frank Kabel: "Re: InputBox code"
- In reply to: Steph: "Can't populate combobox list with 1 item"
- Next in thread: Steph: "Re: Can't populate combobox list with 1 item"
- Reply: Steph: "Re: Can't populate combobox list with 1 item"
- Reply: Steph: "Re: Can't populate combobox list with 1 item"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 22:55:46 +0200
Hi
use the additem method of your combobox. e.g.
UserForm1.ComboBox1.additem
Price.Range("LMU").Resize(Price.Range("LMU").Rows.Count - 1).Value
--
Regards
Frank Kabel
Frankfurt, Germany
Steph wrote:
> Hi. I am populating combobox lists with the following code:
>
> UserForm1.ComboBox1.List =
> Price.Range("LMU").Resize(Price.Range("LMU").Rows.Count - 1).Value
>
> I have the ranges set up as named ranges, but for other purposes, i
> have a blank cell as the last cell in each range. So in order to
> remove that from the list, I am using the Count-1. This works great
> until I get to a range that has only line in it (well, 2 lines - one
> populated and then the one blank line).
>
> When I run this, I get an error 381 - so apparently the combobox will
> not allow me to populate it's list with only 1 selection?? Is there
> any way around this??
>
> Thanks so much!
- Next message: sebastienm: "RE: Efficient Code For Writing An Array To A Worksheet"
- Previous message: Frank Kabel: "Re: InputBox code"
- In reply to: Steph: "Can't populate combobox list with 1 item"
- Next in thread: Steph: "Re: Can't populate combobox list with 1 item"
- Reply: Steph: "Re: Can't populate combobox list with 1 item"
- Reply: Steph: "Re: Can't populate combobox list with 1 item"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|