跳到主内容

搜索

搜索

multiply variables and round

评论

1 条评论

  • Avatar
    Brandon Morrisey

    I think you may want to use the round function in VB script (copy of help file content on this function below).

     

    Round Function

    Round Function

    Returns a number rounded to a specified number of decimal places.

    Round(expression[, numdecimalplaces])

    Arguments

    expression

    Required. Numeric expression being rounded.

    numdecimalplaces

    Optional. Number indicating how many places to the right of the decimal are included in the rounding. If omitted, integers are returned by the Round function.

    Remarks

    The following example uses the Round function to round a number to two decimal places:

    Dim MyVar, pi
    pi = 3.14159
    MyVar = Round(pi, 2) ' MyVar contains 3.14.

     

    0

请先登录再写评论。