Text Boxes on Userforms
Patrick
Thanks for reply. Maybe I haven't explained myself properly.
On my worksheet I have in cell a3 the formula =a1+a2 and that works fine. I
also want to show this data with a userform - so I have my three textboxes
textbox1, textbox2 and textbox3 with their controlsource set to the
respective cells.
When I enter any data, say 3, in textbox1 then textbox3 is calculated
correctly to 7. However at the same time the formula stored in a3 becomes 7,
not =a1+a2 as it was originally. The result of the calculation, 7,
overwrites the formula in cell a3.
I have a small workbook here that I could send you.
Many thanks.
Max
"Patrick Molloy" wrote in message
...
are you confusing the cell value is versus what the cell
forumula is? IF A1=3 and A2=4 then then A3 must be 7 if
you sets its formula to A1+A2. thats the point of excel !
setting the source of the textboxes will show the cell's
value in the text box.
Its not clear to me what you're trying to achieve. If to
change the value in the textboxes linked to A1 and A2
then the value in A3 will change, and thus, so will the
value in the associated textox. If you enter anything in
the textbox3, it will write over what' in A3. To prevent
this, set the textbox 'enable'property to False
Patrrick Molloy
Microsoft Excel MVP
-----Original Message-----
Hi
I'm a bit stuck with textboxes on forms. On my worksheet
cell a3 cointains
the formula =a1+a2.
I then have a form with 3 textboxes. They and their
respective control
sources a
textbox1 sheet1!a1
textbox2 sheet1!a2
textbox3 sheet1!a3
However when I enter anything in textbox1 or textbox2
the formula in my cell
a3 is overwritten with result of the calculation. For
example if I have 3 in
a1 and 4 in a2 I have 7 in a3 not =a1+a2.
I've tried locking the textbox, making enable false and
making tab stop
false. I can do my matchs on the form ie
textbox3=val(textbox1)+val(textbox2) but its a bit
longwinded.
Am I using these completely incorrectly?
Thanks
Max
.
|