We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

How to Converto from Scientific Notation to a Two decimal float in VBA for RW

Medium Priority
683 Views
Last Modified: 2012-05-06
Hello:
i'm using VBA in RW and when i divide two strings using the val function, i get the result in scientific notation and i want them in a two decimal float, how do it.

I think thare are two ways, in the RW using the format option of the calculated field or in VBA, both are fine with me, but i don't know how to do it either way.

I attached the code i've used in VBA.

Regards

Luis
Dim quantity as double
quantity = val(Qtytoinvoice.value) / rs("m")
'this gives me a number in scientific notation
msgbox quantity,vbokonly

Open in new window

Comment
Watch Question

Hello:

I've used the format function, format(expression,"########.##") and it did the trick

Regards

Luis

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.