Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 672
  • Last Modified:

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

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

0
lguifarro
Asked:
lguifarro
1 Solution
 
lguifarroAuthor Commented:
Hello:

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

Regards

Luis
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now