View Single Post
 
Old 07-06-2018, 08:43 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It will work if you tell the code what the values are or the instruction + becomes the default for combining text strings e.g.

Code:
Dim Sum As Long
Dim Sum2 As String
    'Sum = Val(TextBox1.value) + Val(TextBox2.value)
    'or
    Sum = CLng(TextBox1.value) + CLng(TextBox2.value)
    Sum2 = TextBox1.value + TextBox2.value
    MsgBox Sum & vbCr & Sum2
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote