i have two listboxes containing values. i need to multiply these two values
and display the answer in a text box. but am unsure on how to do so!
can anyone help please?
thanks
i have two listboxes containing values. i need to multiply these two values
and display the answer in a text box. but am unsure on how to do so!
can anyone help please?
thanks
Textbox1.Text = Listbox1.Value * Listbox2.Value
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"gem.g" <u23227@uwe> wrote in message news:620e45f13d9b3@uwe...
> i have two listboxes containing values. i need to multiply these two
values
> and display the answer in a text box. but am unsure on how to do so!
> can anyone help please?
> thanks
put the following code into (say) the change event for listbox1 and listbox2
- then the textbox will be updated whenever either value changes.
if listbox1.value <> "" and listbox2.value <> "" then
textbox1.value = listbox1.value * listbox2.value
end
or - simplified
textbox1 = listbox1 * listbox2
"gem.g" wrote:
> i have two listboxes containing values. i need to multiply these two values
> and display the answer in a text box. but am unsure on how to do so!
> can anyone help please?
> thanks
>
thanks for the help, it worked!
another problem i have is..... i have allowed the user to select from a combo
box which then displays a price into a text box. (that all works fine!!) BUT..
... how do i multiply this price by a number which is in a list box and then
display the answer into another list box???
hope you can help!
thanks
Giles B wrote:
>put the following code into (say) the change event for listbox1 and listbox2
>- then the textbox will be updated whenever either value changes.
>
>if listbox1.value <> "" and listbox2.value <> "" then
>textbox1.value = listbox1.value * listbox2.value
>end
>
>or - simplified
>
>textbox1 = listbox1 * listbox2
>
>> i have two listboxes containing values. i need to multiply these two values
>> and display the answer in a text box. but am unsure on how to do so!
>> can anyone help please?
>> thanks
thanks for the help, it worked!
another problem i have is..... i have allowed the user to select from a combo
box which then displays a price into a text box. (that all works fine!!) BUT..
... how do i multiply this price by a number which is in a list box and then
display the answer into another list box???
hope you can help!
thanks
Giles B wrote:
>put the following code into (say) the change event for listbox1 and listbox2
>- then the textbox will be updated whenever either value changes.
>
>if listbox1.value <> "" and listbox2.value <> "" then
>textbox1.value = listbox1.value * listbox2.value
>end
>
>or - simplified
>
>textbox1 = listbox1 * listbox2
>
>> i have two listboxes containing values. i need to multiply these two values
>> and display the answer in a text box. but am unsure on how to do so!
>> can anyone help please?
>> thanks
Gem,
Very similar to before:
In the change event for the two "input" boxes (the ones that are
selectable/changeable - e.g. the combobox and the price listbox) put the
following:
if listbox1.value <> "" and textbox1.value <> "" then _
listbox2.value = listbox1.value * textbox1.value
where:
listbox1 is the price listbox
listbox2 is the listbox where you want the answer to appear
textbox1 is the text box where the price exists
Giles
"gem.g" wrote:
> thanks for the help, it worked!
> another problem i have is..... i have allowed the user to select from a combo
> box which then displays a price into a text box. (that all works fine!!) BUT..
> ... how do i multiply this price by a number which is in a list box and then
> display the answer into another list box???
> hope you can help!
> thanks
>
>
>
> Giles B wrote:
> >put the following code into (say) the change event for listbox1 and listbox2
> >- then the textbox will be updated whenever either value changes.
> >
> >if listbox1.value <> "" and listbox2.value <> "" then
> >textbox1.value = listbox1.value * listbox2.value
> >end
> >
> >or - simplified
> >
> >textbox1 = listbox1 * listbox2
> >
> >> i have two listboxes containing values. i need to multiply these two values
> >> and display the answer in a text box. but am unsure on how to do so!
> >> can anyone help please?
> >> thanks
>
thanks for the help but it didnt work!!!
thanks again
Giles B wrote:
>Gem,
>
>Very similar to before:
>
>In the change event for the two "input" boxes (the ones that are
>selectable/changeable - e.g. the combobox and the price listbox) put the
>following:
>
>if listbox1.value <> "" and textbox1.value <> "" then _
>listbox2.value = listbox1.value * textbox1.value
>
>where:
>
>listbox1 is the price listbox
>listbox2 is the listbox where you want the answer to appear
>textbox1 is the text box where the price exists
>
>Giles
>
>> thanks for the help, it worked!
>> another problem i have is..... i have allowed the user to select from a combo
>[quoted text clipped - 19 lines]
>> >> can anyone help please?
>> >> thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks