Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default AddItem Method - Combobox value

The combobox is located on a worksheet.

ComboBox1.Clear
ComboBox1.AddItem "Jan Week 1"
ComboBox1.AddItem "Jan Week 2"
ComboBox1.AddItem "Jan Week 3"
ComboBox1.AddItem "Jan Week 4"
ComboBox1.AddItem "Jan Week 5"
ComboBox1.AddItem "Jan MTD"

When I use the above code it prevents duplicate values
because of the clear but when I select a value from the
drop down it does not put the value in the combobox. The
combobox is just blank.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default AddItem Method - Combobox value

Todd,

It works fine for me. Are you using the DropButtonClick event to populate
it.

Show all the code.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Todd Huttenstine" wrote in message
...
The combobox is located on a worksheet.

ComboBox1.Clear
ComboBox1.AddItem "Jan Week 1"
ComboBox1.AddItem "Jan Week 2"
ComboBox1.AddItem "Jan Week 3"
ComboBox1.AddItem "Jan Week 4"
ComboBox1.AddItem "Jan Week 5"
ComboBox1.AddItem "Jan MTD"

When I use the above code it prevents duplicate values
because of the clear but when I select a value from the
drop down it does not put the value in the combobox. The
combobox is just blank.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default AddItem Method - Combobox value

yes I am using the code to populate it. Problem is once I
select a value, the value dissapears.


Private Sub ComboBox1_DropButtonClick()
ComboBox1.Clear
ComboBox1.AddItem "Jan Week 1"
ComboBox1.AddItem "Jan Week 2"
ComboBox1.AddItem "Jan Week 3"
ComboBox1.AddItem "Jan Week 4"
ComboBox1.AddItem "Jan Week 5"
ComboBox1.AddItem "Jan MTD"

-----Original Message-----
Todd,

It works fine for me. Are you using the DropButtonClick

event to populate
it.

Show all the code.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Todd Huttenstine"

wrote in message
...
The combobox is located on a worksheet.

ComboBox1.Clear
ComboBox1.AddItem "Jan Week 1"
ComboBox1.AddItem "Jan Week 2"
ComboBox1.AddItem "Jan Week 3"
ComboBox1.AddItem "Jan Week 4"
ComboBox1.AddItem "Jan Week 5"
ComboBox1.AddItem "Jan MTD"

When I use the above code it prevents duplicate values
because of the clear but when I select a value from the
drop down it does not put the value in the combobox.

The
combobox is just blank.



.

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
additem to combobox with an array jocke Excel Discussion (Misc queries) 2 September 29th 05 07:56 PM
AddItem Method Todd Huttenstine Excel Programming 3 April 21st 04 03:53 PM
Please help with AddItem method Shilps Excel Programming 2 April 19th 04 01:24 PM
additem to a combobox from other excel worksheet gelu Excel Programming 1 March 1st 04 04:36 PM
Multiple Column ComboBox using Additem Jimmi Excel Programming 2 September 24th 03 02:40 AM


All times are GMT +1. The time now is 02:06 AM.

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

About Us

"It's about Microsoft Excel"