Avatar of dotnet0824
dotnet0824

asked on 

Visual basic comboBox Selected Item

Hi ,
I have a Visual Basic ComboBox. How can I get the Item selected in the ComboBox by click of a button
i used   cboConStatus.ItemData(cboConStatus.ListIndex)  but I dont get the Text selected instead I get 0,1,2 Ineger values.
Visual Basic Classic

Avatar of undefined
Last Comment
game-master
Avatar of TRobinJames
TRobinJames

cboConStatus.List(cboConStatus.ListIndex) will return list item
Avatar of c0ldfyr3
c0ldfyr3
Flag of Ireland image

cboConStatus.ListIndex is the index of the selected item.

cboConStatus.Text is what's in selection, user entry or otherwise.
ASKER CERTIFIED SOLUTION
Avatar of game-master
game-master
Flag of Philippines image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

165K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo