Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Need help with a Combobox
Old
  (#1)
Guest
Guest
 
Posts: n/a
Default Need help with a Combobox - 06-04-2007, 10:30 AM

I have a question for people out there, I need the Combobox to change a
label caption when the user picks a certain thing from the list. How do I
code this. I've tried an If Then statement, but it doesn't seem to work.
Somebody please help!



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Need help with a Combobox
Old
  (#2)
Jan Hyde
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:30 AM

"What the Hell?" <EMAIL REMOVED>'s wild thoughts
were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
following fruit:

> I have a question for people out there, I need the Combobox to change a
>label caption when the user picks a certain thing from the list. How do I
>code this. I've tried an If Then statement, but it doesn't seem to work.
>Somebody please help!
>


Post the code that doesn't work.

Anyway,

Private Sub Combo1_Click()
Label1.Caption = Combo1.Text
End Sub



Jan Hyde (VB MVP)

--
Man with hole in pocket feel ****y all day.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#3)
Guest
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:30 AM

Sorry I should have been more specific, When the User picks from a list of
provinces, the label changes to a different tax rate. Like when they pick
"AB" then the label says "6%"

"Jan Hyde" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED...
> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
> following fruit:
>
>> I have a question for people out there, I need the Combobox to change a
>>label caption when the user picks a certain thing from the list. How do I
>>code this. I've tried an If Then statement, but it doesn't seem to work.
>>Somebody please help!
>>

>
> Post the code that doesn't work.
>
> Anyway,
>
> Private Sub Combo1_Click()
> Label1.Caption = Combo1.Text
> End Sub
>
>
>
> Jan Hyde (VB MVP)
>
> --
> Man with hole in pocket feel ****y all day.
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#4)
Guest
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:30 AM

sorry, the code that doesnt work is

Private Sub cboProvince_Click()
If cboProvince.List = "AB" then LblTax.Caption = "6%"
End Sub
"Jan Hyde" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED...
> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
> following fruit:
>
>> I have a question for people out there, I need the Combobox to change a
>>label caption when the user picks a certain thing from the list. How do I
>>code this. I've tried an If Then statement, but it doesn't seem to work.
>>Somebody please help!
>>

>
> Post the code that doesn't work.
>
> Anyway,
>
> Private Sub Combo1_Click()
> Label1.Caption = Combo1.Text
> End Sub
>
>
>
> Jan Hyde (VB MVP)
>
> --
> Man with hole in pocket feel ****y all day.
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#5)
Jan Hyde
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:30 AM

"What the Hell?" <EMAIL REMOVED>'s wild thoughts
were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
following fruit:

>sorry, the code that doesnt work is
>
>Private Sub cboProvince_Click()
> If cboProvince.List = "AB" then LblTax.Caption = "6%"


If cboProvince.Text = "AB" then LblTax.Caption = "6%"





>End Sub
>"Jan Hyde" <EMAIL REMOVED> wrote in message
>news:EMAIL REMOVED.. .
>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
>> following fruit:
>>
>>> I have a question for people out there, I need the Combobox to change a
>>>label caption when the user picks a certain thing from the list. How do I
>>>code this. I've tried an If Then statement, but it doesn't seem to work.
>>>Somebody please help!
>>>

>>
>> Post the code that doesn't work.
>>
>> Anyway,
>>
>> Private Sub Combo1_Click()
>> Label1.Caption = Combo1.Text
>> End Sub
>>
>>
>>
>> Jan Hyde (VB MVP)
>>
>> --
>> Man with hole in pocket feel ****y all day.
>>

>



Jan Hyde (VB MVP)

--
“He’s making a list of chicken and rice,” (Richard Lederer)

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#6)
Guest
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:30 AM

huh, thats the same code that i used, doesn't work

"Jan Hyde" <EMAIL REMOVED> wrote in message
newsEMAIL REMOVED...
> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
> were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
> following fruit:
>
>>sorry, the code that doesnt work is
>>
>>Private Sub cboProvince_Click()
>> If cboProvince.List = "AB" then LblTax.Caption = "6%"

>
> If cboProvince.Text = "AB" then LblTax.Caption = "6%"
>
>
>
>
>
>>End Sub
>>"Jan Hyde" <EMAIL REMOVED> wrote in message
>>news:EMAIL REMOVED. ..
>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
>>> following fruit:
>>>
>>>> I have a question for people out there, I need the Combobox to change
>>>> a
>>>>label caption when the user picks a certain thing from the list. How do
>>>>I
>>>>code this. I've tried an If Then statement, but it doesn't seem to work.
>>>>Somebody please help!
>>>>
>>>
>>> Post the code that doesn't work.
>>>
>>> Anyway,
>>>
>>> Private Sub Combo1_Click()
>>> Label1.Caption = Combo1.Text
>>> End Sub
>>>
>>>
>>>
>>> Jan Hyde (VB MVP)
>>>
>>> --
>>> Man with hole in pocket feel ****y all day.
>>>

>>

>
>
> Jan Hyde (VB MVP)
>
> --
> "He's making a list of chicken and rice," (Richard Lederer)
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#7)
Raoul Watson
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:30 AM

Sorry for the top post.. how about..

Private Sub cboProvince_Click()
if cboProvince.List(cboProvince.ListIndex) = "AB" then LblTax.Caption =
"6%"
' ... etc.
End Sub


"What the Hell?" <EMAIL REMOVED> wrote in message
news:uN1Mg.37$E67.17@clgrps13...
> huh, thats the same code that i used, doesn't work
>
> "Jan Hyde" <EMAIL REMOVED> wrote in message
> newsEMAIL REMOVED...
>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>> were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
>> following fruit:
>>
>>>sorry, the code that doesnt work is
>>>
>>>Private Sub cboProvince_Click()
>>> If cboProvince.List = "AB" then LblTax.Caption = "6%"

>>
>> If cboProvince.Text = "AB" then LblTax.Caption = "6%"
>>
>>
>>
>>
>>
>>>End Sub
>>>"Jan Hyde" <EMAIL REMOVED> wrote in message
>>>news:EMAIL REMOVED ...
>>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>>> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
>>>> following fruit:
>>>>
>>>>> I have a question for people out there, I need the Combobox to
>>>>> change a
>>>>>label caption when the user picks a certain thing from the list. How do
>>>>>I
>>>>>code this. I've tried an If Then statement, but it doesn't seem to
>>>>>work.
>>>>>Somebody please help!
>>>>>
>>>>
>>>> Post the code that doesn't work.
>>>>
>>>> Anyway,
>>>>
>>>> Private Sub Combo1_Click()
>>>> Label1.Caption = Combo1.Text
>>>> End Sub
>>>>
>>>>
>>>>
>>>> Jan Hyde (VB MVP)
>>>>
>>>> --
>>>> Man with hole in pocket feel ****y all day.
>>>>
>>>

>>
>>
>> Jan Hyde (VB MVP)
>>
>> --
>> "He's making a list of chicken and rice," (Richard Lederer)
>>

>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#8)
Guest
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:31 AM

THANX! That helped SOOO much!

"Raoul Watson" <EMAIL REMOVED> wrote in message
news:K22Mg.9251$ay1.3085@trndny08...
> Sorry for the top post.. how about..
>
> Private Sub cboProvince_Click()
> if cboProvince.List(cboProvince.ListIndex) = "AB" then LblTax.Caption
> = "6%"
> ' ... etc.
> End Sub
>
>
> "What the Hell?" <EMAIL REMOVED> wrote in message
> news:uN1Mg.37$E67.17@clgrps13...
>> huh, thats the same code that i used, doesn't work
>>
>> "Jan Hyde" <EMAIL REMOVED> wrote in message
>> newsEMAIL REMOVED...
>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>> were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
>>> following fruit:
>>>
>>>>sorry, the code that doesnt work is
>>>>
>>>>Private Sub cboProvince_Click()
>>>> If cboProvince.List = "AB" then LblTax.Caption = "6%"
>>>
>>> If cboProvince.Text = "AB" then LblTax.Caption = "6%"
>>>
>>>
>>>
>>>
>>>
>>>>End Sub
>>>>"Jan Hyde" <EMAIL REMOVED> wrote in message
>>>>news:EMAIL REMOVED m...
>>>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>>>> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
>>>>> following fruit:
>>>>>
>>>>>> I have a question for people out there, I need the Combobox to
>>>>>> change a
>>>>>>label caption when the user picks a certain thing from the list. How
>>>>>>do I
>>>>>>code this. I've tried an If Then statement, but it doesn't seem to
>>>>>>work.
>>>>>>Somebody please help!
>>>>>>
>>>>>
>>>>> Post the code that doesn't work.
>>>>>
>>>>> Anyway,
>>>>>
>>>>> Private Sub Combo1_Click()
>>>>> Label1.Caption = Combo1.Text
>>>>> End Sub
>>>>>
>>>>>
>>>>>
>>>>> Jan Hyde (VB MVP)
>>>>>
>>>>> --
>>>>> Man with hole in pocket feel ****y all day.
>>>>>
>>>>
>>>
>>>
>>> Jan Hyde (VB MVP)
>>>
>>> --
>>> "He's making a list of chicken and rice," (Richard Lederer)
>>>

>>
>>

>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#9)
Jan Hyde
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:31 AM

"What the Hell?" <EMAIL REMOVED>'s wild thoughts
were released on Thu, 07 Sep 2006 23:18:50 GMT bearing the
following fruit:

>huh, thats the same code that i used, doesn't work


Then why isn't that the code you posted?

It's important you post your actual code.

J

>"Jan Hyde" <EMAIL REMOVED> wrote in message
>newsEMAIL REMOVED.. .
>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>> were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
>> following fruit:
>>
>>>sorry, the code that doesnt work is
>>>
>>>Private Sub cboProvince_Click()
>>> If cboProvince.List = "AB" then LblTax.Caption = "6%"

>>
>> If cboProvince.Text = "AB" then LblTax.Caption = "6%"
>>
>>
>>
>>
>>
>>>End Sub
>>>"Jan Hyde" <EMAIL REMOVED> wrote in message
>>>news:EMAIL REMOVED ...
>>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>>> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
>>>> following fruit:
>>>>
>>>>> I have a question for people out there, I need the Combobox to change
>>>>> a
>>>>>label caption when the user picks a certain thing from the list. How do
>>>>>I
>>>>>code this. I've tried an If Then statement, but it doesn't seem to work.
>>>>>Somebody please help!
>>>>>
>>>>
>>>> Post the code that doesn't work.
>>>>
>>>> Anyway,
>>>>
>>>> Private Sub Combo1_Click()
>>>> Label1.Caption = Combo1.Text
>>>> End Sub
>>>>
>>>>
>>>>
>>>> Jan Hyde (VB MVP)
>>>>
>>>> --
>>>> Man with hole in pocket feel ****y all day.
>>>>
>>>

>>
>>
>> Jan Hyde (VB MVP)
>>
>> --
>> "He's making a list of chicken and rice," (Richard Lederer)
>>

>



Jan Hyde (VB MVP)

--
The poet had written better poems, but he'd also written verse.

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Need help with a Combobox
Old
  (#10)
Guest
Guest
 
Posts: n/a
Default Re: Need help with a Combobox - 06-04-2007, 10:31 AM

look who cares, the problem is solved now, if you read the last 2 posts, so
why even bother posting that reply
"Jan Hyde" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED...
> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
> were released on Thu, 07 Sep 2006 23:18:50 GMT bearing the
> following fruit:
>
>>huh, thats the same code that i used, doesn't work

>
> Then why isn't that the code you posted?
>
> It's important you post your actual code.
>
> J
>
>>"Jan Hyde" <EMAIL REMOVED> wrote in message
>>newsEMAIL REMOVED. ..
>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>> were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
>>> following fruit:
>>>
>>>>sorry, the code that doesnt work is
>>>>
>>>>Private Sub cboProvince_Click()
>>>> If cboProvince.List = "AB" then LblTax.Caption = "6%"
>>>
>>> If cboProvince.Text = "AB" then LblTax.Caption = "6%"
>>>
>>>
>>>
>>>
>>>
>>>>End Sub
>>>>"Jan Hyde" <EMAIL REMOVED> wrote in message
>>>>news:EMAIL REMOVED m...
>>>>> "What the Hell?" <EMAIL REMOVED>'s wild thoughts
>>>>> were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
>>>>> following fruit:
>>>>>
>>>>>> I have a question for people out there, I need the Combobox to
>>>>>> change
>>>>>> a
>>>>>>label caption when the user picks a certain thing from the list. How
>>>>>>do
>>>>>>I
>>>>>>code this. I've tried an If Then statement, but it doesn't seem to
>>>>>>work.
>>>>>>Somebody please help!
>>>>>>
>>>>>
>>>>> Post the code that doesn't work.
>>>>>
>>>>> Anyway,
>>>>>
>>>>> Private Sub Combo1_Click()
>>>>> Label1.Caption = Combo1.Text
>>>>> End Sub
>>>>>
>>>>>
>>>>>
>>>>> Jan Hyde (VB MVP)
>>>>>
>>>>> --
>>>>> Man with hole in pocket feel ****y all day.
>>>>>
>>>>
>>>
>>>
>>> Jan Hyde (VB MVP)
>>>
>>> --
>>> "He's making a list of chicken and rice," (Richard Lederer)
>>>

>>

>
>
> Jan Hyde (VB MVP)
>
> --
> The poet had written better poems, but he'd also written verse.
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top