-
Jan 4th, 2012, 06:26 AM
#1
Thread Starter
New Member
[RESOLVED] (ASK) Combo Box VB
how to fill a TextBox based on (2) ComboBox selection ?
for example:
if comboBox1 = "A"
and comboBox2 = "B"
then example.Text = "Test"
thank you before.
Last edited by launk; Jan 4th, 2012 at 06:46 AM.
-
Jan 4th, 2012, 07:08 AM
#2
Re: (ASK) Combo Box VB
To know the combo selected item, read Text property
You already answered yourself
vb Code:
If ComboBox1.Text = "A" And ComboBox2.Text = "B" Then example.Text = "Test" End if
-
Jan 4th, 2012, 01:56 PM
#3
Thread Starter
New Member
Re: (ASK) Combo Box VB
Originally Posted by 4x2y
vb Code:
If ComboBox1.Text = "A" And ComboBox2.Text = "B" Then
example.Text = "Test"
End if
thanks a lot, it work 100%.
-
Jan 4th, 2012, 05:15 PM
#4
Frenzied Member
Re: [RESOLVED] (ASK) Combo Box VB
a short cut
naughty but nice
if combobox1.text & combobox2.text="AB" then example.text = "Test"
here to talk
-
Jan 4th, 2012, 05:19 PM
#5
Frenzied Member
Re: [RESOLVED] (ASK) Combo Box VB
if you have a whole load of combobox1 and combobox2 expressions
use:
Code:
select case combobo1.text & combobox2.text
case "AB"
example.text="Test"
case "BC","DE"
example.text ="oh those two"
case else
example.text ="nothing here worth noting"
end case
clean and easy to read and several things can be matched at one go like "BC" and "DE"
hope this helps
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|