Library tutorials & articles
Combo Box
By James Crowley, published on 14 Jul 2001
Introduction
Combo boxes are used throughout Windows. You can use them to allow a user to enter, or select a certain value from a drop-down list. This tutorial shows you how to use it in VB!
Related articles
Related discussion
-
Sending mails through SMTP Server directly
by NaseemAhmed (0 replies)
-
VB6, SQL 2005 & DMO
by elajaunie3 (1 replies)
-
sending sms from pc
by sriraj20074 (0 replies)
-
Automating Excel from VB6.0
by epurdy (0 replies)
-
VB6 system conversion using VBA to Word 2007
by b.macgregor@vodamail.co.za (0 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Try this:
ComboBox1.Items.Add("Text")
It's pretty flexible, you can put just about anything in there:
ComboBox1.Items.Add("Text" & RichTextBox1.Text & someVariable & etc.)
- Vincent
The .AddItem is to add items to the Combo Box at run time. This is normally the preferred way of doing this instead of doing it through the properties of the Combo Box.
Usage:
Combo1.AddItem "String"
Yeah, I was getting an error like "Invalid procedure call or argument" (Runtime error 5). It seems to work if I remove the index # (rather than Combo1.Additem "Blah" 2, just Combo1.Additem "Blah").
Combo1.AddItem tells me that it's a wrong code.
This thread is for discussions of Combo Box.