Link to home
Start Free TrialLog in
Avatar of GeneBat
GeneBatFlag for United States of America

asked on

Variant Math in VBA

How do I add 2 variant variables in VBA?
Dim  bTotalsfsAOS  as  Variant
If rs.Fields(0).Value = "N" Then
         bTotalsfsAOS = Val(bTotalsfsAOS) + FormatNumber(rs.Fields(5))
     
     End If

When I use this code is returns the variants concatenated and not added.
SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial