Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Add values to a dropdown box

How do I add values to a dropdown box?
Like
John
Peter
Mary
.....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Add values to a dropdown box

try this way:


Sub qq()
Dim table_range

table_range = Array(ComboBox1, ComboBox2, ComboBox3..... ComboBox100) ' one
or set of many combos in a form

For i = 0 To 57 'e.g values or variables concerning number of combos -
optional line
table_range(i).AddItem "Z1" ' values or variables
table_range(i).AddItem "Z2"
table_range(i).AddItem "Z3"

Next i

'or

Dim combo As ComboBox
table_range = Array(ComboBox1, ComboBox2, ComboBox3..... ComboBox100)


For i = 0 To 57

Set combo = table_range(i)
combo.AddItem "Z1"
combo.AddItem "Z2"
combo.AddItem "Z3"

Next i

End Sub



How do I add values to a dropdown box?
Like
John
Peter
Mary
....


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Add values to a dropdown box

additionally, of th esource of the list is a named range, then just extend
the range to cover new items ... using a dynamic range will save some trouble.

"Man Utd" wrote:

How do I add values to a dropdown box?
Like
John
Peter
Mary
.....



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
How do i set up a dropdown listbox of values in a column of cells TheRulie Excel Worksheet Functions 2 May 31st 07 12:38 PM
Dropdown Values Susie Excel Worksheet Functions 1 December 21st 06 12:57 AM
populating DropDown with Values Of a Column in another Sheet. ZarrinPour Excel Discussion (Misc queries) 7 March 12th 06 02:51 PM
Retrieving Dropdown/Option Button Values entonne Excel Programming 1 October 5th 04 07:48 PM
AutoFilter Values + DropDown Boxes VBA chrisdarl[_5_] Excel Programming 0 April 26th 04 10:20 PM


All times are GMT +1. The time now is 11:56 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"