We help IT Professionals succeed at work.

How do I make a Word 2010 VBA procedure statement to round up to the next whole number?

cowboywm
cowboywm asked
on
I'd like to have this procedure round up the result of this formula to the next whole number.  I also want it displaced with no period or decimal places.  What can I add to make this happen?

    ActiveDocument.Bookmarks("EarPlugs").Range.Text = ClothingSections.DaysTextBox.Value * 0.33
Comment
Watch Question

Software Team Lead
Commented:

try apply Format function?


like:


ActiveDocument.Bookmarks("EarPlugs").Range.Text = Format(ClothingSections.DaysTextBox.Value * 0.33, "#,#0 ")

or

ActiveDocument.Bookmarks("EarPlugs").Range.Text = Format(ClothingSections.DaysTextBox.Value * 0.33, "#,#0.00")


?

Author

Commented:
Thanks, Ryan.  That was what I was looking for.  It certainly did the trick.