Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
stockpick
 
Posts: n/a
Default Use a text box to calculate and show results in a user form

I think this is a simple operation but I can not find the way to do it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I want to use
tb3 to show the results of the enteries made in tb1 & 2. For example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show the
calculated result as the user will not be allowed to move onto that textbox.
At this point the record wil is part of a larger form and not updated to the
worksheet.

Regards
  #2   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

In the change event for the first two textboxes, put the formula:

tb3 = tb2 - tb1

Mangesh



"stockpick" wrote in message
...
I think this is a simple operation but I can not find the way to do it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I want to

use
tb3 to show the results of the enteries made in tb1 & 2. For example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show the
calculated result as the user will not be allowed to move onto that

textbox.
At this point the record wil is part of a larger form and not updated to

the
worksheet.

Regards



  #3   Report Post  
stockpick
 
Posts: n/a
Default

sorry to be a pain but where do I find this to enter the text ? - thanks for
the quick reply

"Mangesh Yadav" wrote:

In the change event for the first two textboxes, put the formula:

tb3 = tb2 - tb1

Mangesh



"stockpick" wrote in message
...
I think this is a simple operation but I can not find the way to do it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I want to

use
tb3 to show the results of the enteries made in tb1 & 2. For example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show the
calculated result as the user will not be allowed to move onto that

textbox.
At this point the record wil is part of a larger form and not updated to

the
worksheet.

Regards




  #4   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

In your user_form, double click on the textbox tb1, this will open the VBE
with the following:

Private Sub tb1_Change()
tb3 = tb2 - tb1
End Sub

Repeat for the second textbox.

Mangesh



"stockpick" wrote in message
...
sorry to be a pain but where do I find this to enter the text ? - thanks

for
the quick reply

"Mangesh Yadav" wrote:

In the change event for the first two textboxes, put the formula:

tb3 = tb2 - tb1

Mangesh



"stockpick" wrote in message
...
I think this is a simple operation but I can not find the way to do

it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I want

to
use
tb3 to show the results of the enteries made in tb1 & 2. For example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show the
calculated result as the user will not be allowed to move onto that

textbox.
At this point the record wil is part of a larger form and not updated

to
the
worksheet.

Regards






  #5   Report Post  
stockpick
 
Posts: n/a
Default

thanks for that Mangesh but I now get a runtime error 13 type mismatch, I
dint suppose you can help with that, I am using numbers I guess it is looking
for a text or something. Any advice would be great - Thanks

"Mangesh Yadav" wrote:

In your user_form, double click on the textbox tb1, this will open the VBE
with the following:

Private Sub tb1_Change()
tb3 = tb2 - tb1
End Sub

Repeat for the second textbox.

Mangesh



"stockpick" wrote in message
...
sorry to be a pain but where do I find this to enter the text ? - thanks

for
the quick reply

"Mangesh Yadav" wrote:

In the change event for the first two textboxes, put the formula:

tb3 = tb2 - tb1

Mangesh



"stockpick" wrote in message
...
I think this is a simple operation but I can not find the way to do

it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I want

to
use
tb3 to show the results of the enteries made in tb1 & 2. For example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show the
calculated result as the user will not be allowed to move onto that
textbox.
At this point the record wil is part of a larger form and not updated

to
the
worksheet.

Regards








  #6   Report Post  
stockpick
 
Posts: n/a
Default

can not get this to work can anybody help with some code or a working example

"stockpick" wrote:

thanks for that Mangesh but I now get a runtime error 13 type mismatch, I
dint suppose you can help with that, I am using numbers I guess it is looking
for a text or something. Any advice would be great - Thanks

"Mangesh Yadav" wrote:

In your user_form, double click on the textbox tb1, this will open the VBE
with the following:

Private Sub tb1_Change()
tb3 = tb2 - tb1
End Sub

Repeat for the second textbox.

Mangesh



"stockpick" wrote in message
...
sorry to be a pain but where do I find this to enter the text ? - thanks

for
the quick reply

"Mangesh Yadav" wrote:

In the change event for the first two textboxes, put the formula:

tb3 = tb2 - tb1

Mangesh



"stockpick" wrote in message
...
I think this is a simple operation but I can not find the way to do

it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I want

to
use
tb3 to show the results of the enteries made in tb1 & 2. For example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show the
calculated result as the user will not be allowed to move onto that
textbox.
At this point the record wil is part of a larger form and not updated

to
the
worksheet.

Regards






  #7   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

can you post your entire code you are using...?

Mangesh




"stockpick" wrote in message
...
thanks for that Mangesh but I now get a runtime error 13 type mismatch, I
dint suppose you can help with that, I am using numbers I guess it is

looking
for a text or something. Any advice would be great - Thanks

"Mangesh Yadav" wrote:

In your user_form, double click on the textbox tb1, this will open the

VBE
with the following:

Private Sub tb1_Change()
tb3 = tb2 - tb1
End Sub

Repeat for the second textbox.

Mangesh



"stockpick" wrote in message
...
sorry to be a pain but where do I find this to enter the text ? -

thanks
for
the quick reply

"Mangesh Yadav" wrote:

In the change event for the first two textboxes, put the formula:

tb3 = tb2 - tb1

Mangesh



"stockpick" wrote in message
...
I think this is a simple operation but I can not find the way to

do
it.
I have a excel user form with 3 text boxes, tb1, tb2 and tb3. I

want
to
use
tb3 to show the results of the enteries made in tb1 & 2. For

example
tb1 = Maximum
tb2 = Minimum
tb3 = Maximum - Minimum
After the entry is made in tb2 then tb3 will automatically show

the
calculated result as the user will not be allowed to move onto

that
textbox.
At this point the record wil is part of a larger form and not

updated
to
the
worksheet.

Regards








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
How to calculate and then show up as a percent? Amuse Excel Worksheet Functions 1 July 10th 05 10:19 PM
Calculate APR from ARY Ron737 Excel Worksheet Functions 2 July 1st 05 02:30 PM
How do I calculate amortization to show months? Maria New Users to Excel 1 June 2nd 05 08:41 AM
I need help to get formula to calculate royalties recouped with sa nono404 Excel Worksheet Functions 4 March 10th 05 09:20 PM
How can I show Feet and inches in a Excel cell? Magama13 Excel Discussion (Misc queries) 1 January 28th 05 03:27 PM


All times are GMT +1. The time now is 11:01 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"