跳到主内容

搜索

搜索

VBScript - Cannot add values?

评论

2 条评论

  • Avatar
    Peter Thane

    Although the values are numeric the VB is thinking they are text and so is concatenating the fields together. If you add CInt(......) to both strings then that will then work

    ie Value = CInt(Format.NamedSubStrings("TotalOrder").Value) + CInt(Field....<etc>....)

    0
  • Avatar
    Patryk Gawrysiak

    Thanks Peter Thane, 

    I used your method and ran into an overflow error, however I fixed it by using 'CLng' instead of 'CInt'

    Thanks Again.

    0

请先登录再写评论。