Getting Value as 8.5265128291212E-14 instead of getting 0 or zero in Textbox when values changed and calculated

NimishK

Well-known Member
Joined
Sep 4, 2015
Messages
688
Hello

Though explored quite few threads on this forum and other links. i did not get the right solution

I am Getting value as 8.5265128291212E-14 instead of getting 0 or zero in Textbox when values changed and calculated.
happens in tbx10

In worksheet the values are changed as per below change events
in other words want to replica the textbox as cells as worked in worksheet

Code:
Private Sub tbx10_Change()
ws.Cells(curRow, 10).Formula = "=K" & curRow & "+L" & curRow & "-M" & curRow  
tbx10.value = Format(Sheet1.Range("A" & curRow), "0.00") 
End Sub   

Private Sub tbx11_Change()
tbx11.value = ws.Cells(curRow, 11).value
tbx10.value = Val(tbx11.value) + Val(tbx12.value) - Val(tbx13.value)
End Sub   

Private Sub tbx12_Change()
tbx12.value =ws.Cells(curRow, 12).value 
tbx10.value = Val(tbx11.value) + Val(tbx12.value) - Val(tbx13.value)
End Sub   


Private Sub tbx13_Change()
tbx13.value = ws.Cells(curRow, 13).value   
tbx10.value = Val(tbx11.value) + Val(tbx12.value) - Val(tbx13.value)
End Sub

Thanks
NimishK
 
Last edited:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Here, you rounded the value.
Code:
tbx10.value = Format(Sheet1.Range("A" & curRow), "0.00")
 
Upvote 0
Thank you so much
only change i made in your syntax
Code:
tbx10.value = Format(Sheet1.Range("A" & curRow).value, "0.00")
NimishK
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

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.
Go back
Back
Top