Andrew, doesn't work for me. Your formula, with = in front, gives #NAME?. Without the = give label in the cell. Where do you put formula, in text box 3 or in a cell in the spreadsheet?
Private Sub TextBox1_LostFocus()
TextBox3.Value = Val(TextBox1.Value) + Val(TextBox2.Value)
End Sub
Private Sub TextBox2_LostFocus()
TextBox3.Value = Val(TextBox1.Value) + Val(TextBox2.Value)
End Sub
In VBE (Visual Basic Editor) double click on TextBox2. Empty code shows. In dropDown (Up-Right) select "AfterUpdate" Event and add code like This:
----------------------------------
Private Sub TextBox2_AfterUpdate()
TextBox3.Value = Val(TextBox1.Value) + Val(TextBox2.Value)
End Sub
----------------------------------
Run forms, and whenever You changes value in TextBox2 - Value in TextBox3 automaticaly will be recalculated.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.