Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AutoCAD VBA roundup function
#1
AutoCAD VBA roundup function

Code:
Function RoundUp(ByVal Value As Double)
    If Int(Value) = Value Then
        RoundUp = Value
    Else
        RoundUp = Int(Value) + 1
    End If
End Function


'call statements
sideholes = RoundUp((OPHEIGHT - 50) / 400)
Reply
#1
AutoCAD VBA roundup function

Code:
Function RoundUp(ByVal Value As Double)
    If Int(Value) = Value Then
        RoundUp = Value
    Else
        RoundUp = Int(Value) + 1
    End If
End Function


'call statements
sideholes = RoundUp((OPHEIGHT - 50) / 400)
Reply
CAA


Forum Jump:


Users browsing this thread: 2 Guest(s)