Computing.Net > Forums > Programming > Combo Boxes in VBA

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Combo Boxes in VBA

Reply to Message Icon

Name: The Fayth
Date: January 2, 2004 at 07:44:40 Pacific
OS: Windows XP
CPU/Ram: 2.66 Ghz / 512 Mb
Comment:

Hi
I was wondering if anyone knows how to collect data from excel, and code it in VBA so it transfers it into a combo box in VBA, because i'm doing a project and i need the names of 4 teams that are on a worksheet in excel and i need them in a combo box in VBA, by using a for next loop, preferably.

Thanks




Sponsored Link
Ads by Google

Response Number 1
Name: egkenny
Date: January 2, 2004 at 19:38:48 Pacific
Reply:

Given:
Worksheet named: Sheet1
Combo box named: MyComboBox
Data on worksheet:
B4: Fox
B5: Bear
B6: Swan
B7: Cat
B8: Dog

Copy data to combo box:

Worksheets("Sheet1").Activate
For i = 4 To 8
rng = "B" + Format(i)
MyComboBox.AddItem Range(rng).Value
Next i


0

Response Number 2
Name: The Fayth
Date: January 3, 2004 at 04:32:00 Pacific
Reply:

Thanks for the help


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Combo Boxes in VBA

Combo Box in IE vs. Netscape www.computing.net/answers/programming/combo-box-in-ie-vs-netscape/9118.html

MS-Access VBA Combo box www.computing.net/answers/programming/msaccess-vba-combo-box/5587.html

VBS combo box in batch www.computing.net/answers/programming/vbs-combo-box-in-batch/19191.html