Link to home
Start Free TrialLog in
Avatar of Syncer
SyncerFlag for United States of America

asked on

Getting an Integer Value from a Combobox and sharing it

In Visual Studio 2008 IDE, I need to take the selected value from a combobox that's in one class and pass it to a function in another class AS an integer. My Combobox has a list of options like:
LogLevel 1
LogLevel 2
etc

All the documentation and examples I'm finding are using outdated VB6 code.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is the values you have ?
LogLevel 1
LogLevel 2
LogLevel 3
etc
Can they change it ? You can use something like:
 

Dim intValue As Integer = Me.ComboBox1.Text.Substring(9).Trim

Open in new window

if you set the ValueMember of the combo, you should be able to retreive the value into the SelectValue property.

How do you fill the Combo?