Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 106,234 times

Contents

Related Categories

Combo Box - Introduction

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!

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Re: [70] Combo Box

    Posted by vincerihoo on 13 Apr 2007

    Try this:


    ComboBox1.Items.Add("Text")


    It's pretty flexible, you can put just about anything in there:


    ComboBox1.Items.Add("Text" & RichTextBox1.Text & someVaria...

  • Posted by Evic on 07 Mar 2004

    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 "Stri...

  • Posted by HyperHacker on 11 Apr 2003

    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").

  • Error code

    Posted by mechuser2 on 06 Aug 2002

    Combo1.AddItem tells me that it's a wrong code.