Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Text Box Control Source

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Text Box Control Source

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Text Box Control Source


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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Text Box Control Source

Not much code to show as file going to novice users to
amend.
The full scenario:
-One userform
-two drop down boxes:
-first chooses consultant
-second chooses component
-both values sent to separate cells on spreadsheet
-values used via lookup table to return two new values
-these valuse are to be displayed on same userform

Its the last stage i cannot achieve - i have a command
button to update the values, but i have the probelm of the
calculated values from the lookup tables (the formulas)
being overwritten.

Any help appreciated.

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



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text Box Control Source

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



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
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


.



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text Box Control Source

Each time the click event of the combobox is fired then Textbox1 should be
updated.

You might want to qualify the range with the worksheet name

Private Sub Combobox1_Click()
TextBox1.Value = Worksheets("Sheet3").Range("H30")
End Sub

--
Regards,
Tom Ogilvy

"Richard" wrote in message
...
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


.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for control source in combo box control dhstein Excel Discussion (Misc queries) 1 August 12th 09 05:38 PM
Control Source on UserForm Richard Excel Programming 1 May 17th 04 01:27 PM
Control Source Dave D[_3_] Excel Programming 1 April 28th 04 07:20 PM
Query on Control Source in Userform Textbox golf4 Excel Programming 4 February 18th 04 02:27 AM
Control Source Steven Taylor[_2_] Excel Programming 0 July 16th 03 04:01 PM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"