ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Textboxes interfere with each other ... :( (https://www.excelbanter.com/excel-programming/343701-textboxes-interfere-each-other.html)

Matt[_33_]

Textboxes interfere with each other ... :(
 
Hi There,

I have a form with comboboxes and textboxes....

There is one textbox where the user enters text...

so far so good.

If the user (after entering text) clicks in the other textbox it will
put in there what is in the first textbox. The second textbox is
locked so you cant even enter anything (thats how it should be) but
when clicking in it excel copies the contend of the first textbox in
there...

They have different control sources ...

How can I stop excel from doing that? The second textbox is a
dataoutput and it looks silly if it changes based on user input..

Matt


Nigel

Textboxes interfere with each other ... :(
 
Hi
Excel will not copy the first textbox value into the second unless the
linked cell changes or your code acts this way.

Rather than use a control source you can assign a value directly using
textbox2.value = "Your Value", if you want this to be based on another
textbox then assign the value textbox2.value = textbox1.value, if you put
this in the textbox1 change event then as the user types into textbox1,
textbox2 will change.

When you say the textbox is locked I assume you mean enabled=false; this
will prevent the user entering this textbox and it will be 'greyed' out.

--
Cheers
Nigel



"Matt" wrote in message
ups.com...
Hi There,

I have a form with comboboxes and textboxes....

There is one textbox where the user enters text...

so far so good.

If the user (after entering text) clicks in the other textbox it will
put in there what is in the first textbox. The second textbox is
locked so you cant even enter anything (thats how it should be) but
when clicking in it excel copies the contend of the first textbox in
there...

They have different control sources ...

How can I stop excel from doing that? The second textbox is a
dataoutput and it looks silly if it changes based on user input..

Matt




Matt[_33_]

Textboxes interfere with each other ... :(
 
I checked, the sources and taegets for these boxes are not linked ..
cant figure out why it does it :(



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com