René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

format [VBA]

option explicit

public sub format_()

  dim str as string
  dim dbl as double

  dbl = 42.42
  str = format(dbl, "0.0")  ' 42.4
  msgBox(str)

  dbl = 42.52
  str = format(dbl, "0.0")  ' 42.5
  msgBox(str)

end sub
See also other VBA stuff