comboBox
Hi All,
I am trying to create a straight forward combobox with 2 options: UK and Ireland.
I have not dont a combo box and i have no idea how go create one, all i have done so far is place a combobox on screen:
Private Sub Combo1_Change()
End Sub
Could anyone point me in the right direction? :confused:
[348 byte] By [
mp_direct] at [2007-11-11 7:18:35]

# 1 Re: comboBox
The first place to look to learn about combo boxes is the Index of the Help Menu of your VB module, msdn. Some of the things to look at would be the
List, List Count, and List Index Properties; the Add Item, Clear, and Remove Item Methods. I have found that the Click Event is much more helpful that the change event that you show. A combo box, like a list box, has to have items added through the add item method before most other events have any meaning. Where you place the add item method will be determined by your
project.
# 3 Re: comboBox
Well, install it then! ;-) MSDN is also available online at http://msdn.microsoft.com/library . In the Table of Contents, drill down to Development Tools and Languages -> Visual Studio 6.0 -> Visual Basic 6.0 -> Product Documentation -> Reference. Here's a direct link to the ComboBox page: http://msdn.microsoft.com/library/en-us/vb98/html/vbobjComboBox.asp
# 4 Re: comboBox
Hi All,
in my code i am loading the following values:
ComboCountry.AddItem "UK", 0
ComboCountry.AddItem "Republic of Ireland", 1
Can someone help me do the folloing? i bit stuck
if case index =0 then
set currency to pounds
if case index = 1 then
set currency to euros
Any thoughts
# 9 Re: comboBox
Here is how I would do that.
Set the Style Property to "2- Dropdown list"
ComboCountry.Clear
ComboCountry.AddItem "UK"
ComboCountry.AddItem "Republic of Ireland"
If you want to preset the choice use
ComboCountry.text = "UK"
Then Check the result using the text Property
Select Case ComboCountry.text
Case "UK"
set currency to pounds
Case "Republic of Ireland"
set currency to euros
end select
Robb
# 10 Re: comboBox
Yes, sorry. I work with .NET much more than VB6 these days.
What is the best way to get started using .net after all these years of VB6?
I have VS 2003 and have never installed it. Looks like I will have to start soon. Any tips?
Robb Feldhege
feldhege@mindspring.com