TheSwamp

Code Red => VB(A) => Topic started by: Humbertogo on August 21, 2006, 12:40:39 PM

Title: Leading zeros
Post by: Humbertogo on August 21, 2006, 12:40:39 PM
How to Leading zeros
for example if i have
an  value 0.001 must be confort to  .001
Title: Re: Leading zeros
Post by: deegeecees on August 21, 2006, 12:45:59 PM
If in the dwg, find/replace "0." with "." should do the trick.
Title: Re: Leading zeros
Post by: DaveW on August 21, 2006, 02:31:16 PM
Convert it to a trimmed string.

Dim MyNumber as Double

MyNumber = 0.75

Dim MyString as String

MyString = trim(str(MyNumber))

To convert the string to a double use Cdbl(MyString)
To convert the string to an integer use Cint(MyString)
Title: Re: Leading zeros
Post by: Humbertogo on August 22, 2006, 01:50:26 AM
Thanks
Title: Re: Leading zeros
Post by: deegeecees on August 22, 2006, 08:42:02 AM
What he said.