View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
richard richard is offline
external usenet poster
 
Posts: 24
Default Text Box Control Source

I have inserted the folllowing code in the combo click
event as you suggested, but it only seems to work once
when the form is opened.

TextBox1.Value = Range("H30")

Am i missing something to reset it so i can change it as
often as i like?

Thanks for your help

Richard

-----Original Message-----
Don't use the control source property to link to a cell

with a formula. Use
code to update the control on the userform. Clear the

control source
property. Perhaps the click event of one of the

dropdowns is the
appropriate place to trigger the update code. Or if you

have established a
button to do the update, then use the click event for

that.

--
Regards,
Tom Ogilvy


wrote in message
...

Not much code on the form to be honest, as i have to

hand
it over to a non Excel person afterwards.
Both drop down boxes are on the same form. The full
scenario is:
Choose Consultant from first drop down
This is sent to spreadsheet
Choose Component from second drop down
This is sent to another cell on spreadsheet

Using lookup tables on spreadsheet i then calculate two
new values in two new cells.

It is these cells i wish to have displayed on the

userform.
I have added a commandbutton to update the userform once
the dropdowns have been selected.

Hope this info is of more help

Richard

-----Original Message-----
Perhaps a sample of your userform code would help. It

appears, from your
earlier post, that you want to input a value in one

textbox, do a lookup on
that value, and display the results in a second

textbox.
Are both textboxes
on the same userform? Do both textboxes have the same

controlsource? Give
specifics.
Mike
"Richard" wrote

in
message
...
I cannot stop my userform text box overwriting my

control
source cell. The value for this cell is calculated
elsewhere, so i just want to display it on the

userform.
How can i achieve this?

Thanks in advance

Richard


.



.