Adding strings/integers???

J-F

Registered User.
Local time
Today, 05:45
Joined
Nov 14, 2001
Messages
41
I have a form with a large number of text boxes where the info entered are all 3 figure numbers. In some of the boxes, there sometimes are 2 sets of number seperated by a comma (123,456) and in others, there may be nothing.

I need to be able to add all those numbers together and display the sum on another text box.

So far, I have added the box values together as strings with a comma in between so I end up with 123,234,,552,772,,,,645 etc

What would be the simplest/quickest way of adding those number up?
 
DIM an array in VBA AS Integer,
using yr output fm textboxes, use function CInt(txtone) to add to yr array

ie, myarray(0) = Cint(txtone): myarray(1) = Cint(txtTwo) etc

then txtresult = "" & myarray(0) + myarray(1) etc
 
Thanks
 

Users who are viewing this thread

Back
Top Bottom