option explicit
public sub round_()
dim v as variant
v = 54.4
' msgBox(round(v))
if (round(v) <> v) then
msgBox("round(" & v & ") <> " & v )
else
msgBox("round(" & v & ") = " & v )
end if
v = 54
' msgBox(round(v))
if (round(v) <> v) then
msgBox("round(" & v & ") <> " & v )
else
msgBox("round(" & v & ") = " & v )
end if
v="22"
if (round(v) <> v) then
msgBox("round(" & v & ") <> " & v )
else
msgBox("round(" & v & ") = " & v )
end if
if (round(cdbl(v)) <> cdbl(v)) then
msgBox("round(" & v & ") <> " & v )
else
msgBox("round(" & v & ") = " & v )
end if
end sub