![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
hey im new to the forum and vb aswell
![]() i have a combo box but how do i get the text from it i tried if (combo1.seltext = "bla") then bla but it didnt work and i tried combo1.text and that did not work either ? what am i doing wrong thanks |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Combo1.Text should work....
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
must be me doing something wrong then
could you please tell me what it is Private Sub Combo1_Click() If (Combo1.Text = dark) Then Text1.Text = dark ElseIf (Combo1.Text = Light) Then text1.text = light End If End Sub ive got no idea ?_? thanks |
|
|
|
|
|
#4 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
You need quotes around the buggers:
If (Combo1.Text = "dark") Then Text1.Text = "dark" ElseIf (Combo1.Text = "light") Then Text1.Text = "light" End If |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
thanks alot for your helpstill wont seem to work though >_< maybe its because its the wrong event but i tried click and change and nothing also i changed the type of the combo so that it can not be edited i think thats why i cant get the .text property to work because its like a normal list box selection (which i dont know how to get the text from either) any ideas thanks alot ![]() |
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Make sure they're in the correct case as well.
|
|
|
|
|
|
#7 |
|
Hobbyist Programmer
Join Date: Jan 2005
Posts: 110
Rep Power: 4
![]() |
lol
![]() yep they had a capital on the first letter, i didnt think that would matter thanks alot ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|