ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What do i wrong here (https://www.excelbanter.com/excel-programming/306712-re-what-do-i-wrong-here.html)

kkknie[_182_]

What do i wrong here
 
Excel is assuming that in the first case the textboxes are numbers sinc
you are subtracting them. In the second case, it assumes they are tex
(because the + sign can be used to concatenate text strings) so it i
concatenating.

Change the code to:

flydiff = (CDbl(TextBox7.Value) + CDbl(TextBox10.Value))

where CDbl converts to a double floating point variable type.



--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:31 AM.

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