Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

working with math

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I have the following line of code

total1r = num1 + num2 + num3 + num4 + num5 + num6 + num7 + num8 + num9 + num10 + num11 + num12 + num13 + num14 + num15

I get a BC30188: Declaration expected error.

I tried adding the namespace system.Math, but that didn't work. I am sure this is very obvious fix.
 
Did you declare your variables?

Dim total1r As Decimal
Dim num1 As Decimal
Dim num2 As Decimal
Dim num3 As Decimal
Dim num4 As Decimal
Dim num5 As Decimal
Dim num6 As Decimal
Dim num7 As Decimal
Dim num8 As Decimal
Dim num9 As Decimal
Dim num10 As Decimal
Dim num11 As Decimal
Dim num12 As Decimal
Dim num13 As Decimal
Dim num14 As Decimal
Dim num15 As Decimal

total1r = num1 + num2 + num3 + num4 + num5 + num6 + num7 + num8 + num9 + num10 + num11 + num12 + num13 + num14 + num15

Kris
- People will accept your ideas much more readily if you tell them that Benjamin Franklin said it first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top