Private XLapp as object
Public Function XRound(val As Double, Optional Places As Integer = 2) As Double
If IsNumeric(val) Then
Dim XLapp As Object
If XLapp Is Nothing Then Set XLapp = CreateObject("Excel.Application")
'this will launch a blank copy of excel
Set XLapp = GetObject(, "Excel.Application")
XRound = XLapp.WorksheetFunction.Round([val], 2)
End If
End Function