View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kkknie[_182_] kkknie[_182_] is offline
external usenet poster
 
Posts: 1
Default 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