|
-
Feb 6th, 2000, 02:28 AM
#1
Thread Starter
Addicted Member
add2 = (((i + j) + (k + l)) + ((m + n) + (o + p)))
-
Feb 6th, 2000, 02:36 AM
#2
Lively Member
If you want to add two numbers I think you have to put add2 = Val(a)+ Val(b). Just an example. Or I think you can just dim your numbers as variables, not quite sure. HTH
[This message has been edited by ravcam (edited 02-06-2000).]
-
Feb 6th, 2000, 05:33 PM
#3
Frenzied Member
You should DIM each variable as an integer, long or double depending on the type of number it can contain (look in the help for info on integers, longs and doubles)
eg;
Dim a as double
dim b as double
dim c as double
add2=................
If you don't DIM them VB may think they are strings and just add them together;
eg "1"+"2"="12" when you expected 3!
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|