LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default Populate a combo box from a worksheet with VBA

I have a user form to enter data into an excel spreadsheet. I have a combo
box which needs to have 10 items in it, previously i have used the following -

With cboTrainer
.AddItem = "1"
.AddItem = "2"
.AddItem = "3"
.AddItem = "4"
.AddItem = "5"

Instead of this can i dynamically populate this list from data in my
spreadsheet, like this -

With cboTrainer
.AddItem = Trainers!B2

My syntax is not quite right, can anyone assist me?
 
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
populate combo box enyaw Excel Discussion (Misc queries) 1 October 26th 06 03:13 PM
Populate a combo box damorrison Excel Discussion (Misc queries) 11 September 3rd 06 09:04 PM
Best way to populate worksheet from 2 combo boxes jswasson Excel Worksheet Functions 0 July 7th 06 01:21 PM
Populate a Combo or List Box Jonathan Excel Programming 8 September 19th 05 04:08 PM
Populate a combo Box case54321 Excel Worksheet Functions 1 June 14th 05 02:53 PM


All times are GMT +1. The time now is 03:05 PM.

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"