Daren has attended:
Excel VBA Intro Intermediate course
Change Text Box form String to Integer
I have 2 values form text boxes, These are numeric values When I try to add them to gether (ie 2 + 3) I get the value 23 instead of the value 4
The same values are also put in a cell on a Excel sheet which states that they are stored as text.
Should the string forn the text box be changed to an integer, if so how do you change it
below is the programming
TextBoxIn_Hours + TextBoxOut_Hours1
RE: Change Text Box form String to Integer
Hi Daren, thanks for the query and apologies for the delaying in replying. Your code is concatenating the text rather than adding together the values in the textboxes. Try this code out:
(Val(TextBoxIn_Hours) + Val(TextBoxOut_Hours1))
Hope this helps,
Anthony