Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default ComboBox Lists

Hi all,

Need some help.

If a comboBox list is a set range from a worksheet, and as in my case it is a list of customer names.
When selected it creates a new worksheet and pastes the selection into a cell.

But if the customer is Not in the list, can i have the New customer added to the range somehow by code from the combobox value ?

Corey....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default ComboBox Lists

Hi Corey

Sure. If the entry is not in the list then the combobox'es ListIndex is -1. So if it's -1 then add the value to the list.

HTH. Best wishes Harald

"Corey" skrev i melding ...
Hi all,

Need some help.

If a comboBox list is a set range from a worksheet, and as in my case it is a list of customer names.
When selected it creates a new worksheet and pastes the selection into a cell.

But if the customer is Not in the list, can i have the New customer added to the range somehow by code from the combobox value ?

Corey....
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default ComboBox Lists

Corey wrote:
/Hi all,/
//
/Need some help./
//
/If a comboBox list is a set range from a worksheet, and as in my case
it is a list of customer names./
/When selected it creates a new worksheet and pastes the selection into
a cell./
//
/But if the customer is Not in the list, can i have the New customer
added to the range somehow by code from the combobox value ?/
//
/Corey..../



adding at the end.
cbo.AddItem "value", cbo.ListCount

if you have multicolumn combo you can fill out other columns with

cbo.List(cbo.ListCount - 1, column) = "text"
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
ComboBox list reliant on the entry from a different ComboBox ndm berry[_2_] Excel Programming 4 October 4th 05 04:40 PM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM
Multiple ComboBox Lists sailingdan[_3_] Excel Programming 3 July 12th 04 03:46 AM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"