Visual Basic Explorer
Visual Basic Explorer
 Navigation
 Home


 Coding
 Source Code

 FAQ Center

 VB Tips

 Downloads

 ToolBox

 Tutorials

 VB Games

 VB News

 VB Award

 VB Forums



 Affiliates
 Planet Source Code

 Rent a Coder

 DirectX4VB


 Misc
 Search

 Feedback

 Advertise

 About


Need to hire
a VB coder?

Please support our sponsor:

 Home 
 Site Map 
 Forums 
 News 
 Feedback 

 

Q. Selecting ComboBox items?

 
How does one code it so when combo1.item(X) is
selected (highlighted as combo1.text) that a
function is called. I ask because using command
buttons is tedious.

 
A. As far as the combobox question: You can use
a Case statement in Combo1_Click sub as follows:

Private Sub Combo1_Click()
Select Case Combo1.ListIndex
Case 0
'Your code
Case 1
'Your code
End Select
End Sub

 
The ListIndex is one of many ways you could find the
selected item. It works best on a set combobox that
doesn`t change.

(22-Aug-98 DBotkin voelker@erinet.com)


Downloads

In IE right-click and select 'Save Target As...' or in Netscape right-click and select 'Save Link As...'

 

View Plain Text View Plain Text
Download Demo Project Not Available
View Code Online Not Available





Home | About | What's New | Source Code | FAQ | Tips & Tricks | Downloads | ToolBox | Tutorials | Game Programming | VB Award | Search | VB Forums | Feedback | VBNews | Copyright & Disclaimer | Advertise | Privacy Policy |

Quick searches: Site Search | Advanced Site Search 

Copyright 2002 by Exhedra Solutions, Inc.
By using this site you agree to its terms and conditions
VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc.