Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox.SelectedItem

Status
Not open for further replies.

AKarim

Technical User
Mar 20, 2000
41
EU
Hi,<br>I'm having problems with two Combo boxes;<br>Historique & Annuaire are both Comboboxes, <br>I need to use the _click methode to change a value of historique when an object is selected. But if no obj are selected and i select an obj of annuaire the application crashes because Historique.SelectedItem is not valid.<br>How can I test if Historique has at this precise time a selected item ?<br>
 
Check the Historique.listIndex property, if it is equal to -1 there is nothing selected in the Historique combo. <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Also you can gert the current selected item by using this:<br><br>strWhatever = Historique.List(Historique.Listindex)<br> <p>Wally Wojciechowski<br><a href=mailto:wwojo@wilsonpet.com>wwojo@wilsonpet.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top