get combobox data

I need to get the value of a combo box.
can someone help me get that value
my code below does not work

dim s as Main_Window.ComboBox1.Text   

What error are you getting ?

there is no class with this name, then…ComboBox1 is highlighted

dim s as Text = Main_Window.ComboBox1.Text

thanks, I came up with this

If ComboBox1.text = "4RP - 4 Radio Producers" then MsgBox (ComboBox1.text + TextField_CD.Text) End If

Michel, I got

“Type mismatch error, expected Text but got String”

this works

dim s as string = Main_Window.ComboBox1.Text

now, if the result is “4RP - 4 Radio Producers”
how do get just 4RP from the above
does XOJO have something like, get word 1 of the result

anything BEFORE the “-” goes in the variable “field”

Dim field As String field=NthField(Main_Window.ComboBox1.Text ,"-",1)